added a directory to copy when creating examples
This commit is contained in:
parent
e101a132a0
commit
4595d554dc
26
stub/Makefile
Normal file
26
stub/Makefile
Normal 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
13
stub/main.cc
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user