added a directory to copy when creating examples

This commit is contained in:
Stephen M. McQuay 2012-05-02 07:13:39 -06:00
parent e101a132a0
commit 4595d554dc
2 changed files with 39 additions and 0 deletions

26
stub/Makefile Normal file
View File

@ -0,0 +1,26 @@
CXX=clang++
CPPFLAGS=-Wall -g -std=c++0x
SOURCES=main.cc
OBJECTS=$(SOURCES:.cc=.o)
EXE=app
all: $(EXE)
main.o: main.cc
$(EXE): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) -o $@
run: $(EXE)
./$(EXE)
clean:
@rm -vf *.o
@rm -rvf *.dSYM
@rm -vf $(EXE)
debug: $(EXE)
gdb $(EXE)
valgrind: $(EXE)
valgrind --tool=memcheck --leak-check=yes ./$(EXE)

13
stub/main.cc Normal file
View File

@ -0,0 +1,13 @@
#include <iostream>
using namespace std;
const string usage = "usage: regex";
int main(int argc, char * argv []) {
if(argc != 1) {
cerr << usage << endl;
return 1;
}
cout << "hello cruel world" << endl;
return 0;
}