help
Rev | Line | |
---|
[0214596] | 1 | |
---|
| 2 | |
---|
| 3 | SHELL = /bin/sh |
---|
| 4 | |
---|
| 5 | vpath %.o o |
---|
| 6 | |
---|
| 7 | CXXFLAGS = -O2 -static |
---|
| 8 | |
---|
| 9 | sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp0.cc cmdline.cc \ |
---|
| 10 | common.cc global.cc |
---|
| 11 | |
---|
| 12 | bin = dgp |
---|
| 13 | |
---|
| 14 | # plik *.o sa umieszczane w podkatalogu o |
---|
| 15 | objs = $(sources:%.cc=o/%.o) |
---|
| 16 | |
---|
| 17 | ${bin}: ${objs} |
---|
| 18 | ${CXX} ${CXXFLAGS} -o $@ ${objs} |
---|
| 19 | |
---|
| 20 | include $(sources:.cc=.d) |
---|
| 21 | |
---|
| 22 | o/%.o: %.cc |
---|
| 23 | ${CXX} -c ${CXXFLAGS} -o $@ $< |
---|
| 24 | |
---|
| 25 | %.d: %.cc |
---|
| 26 | $(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \ |
---|
| 27 | sed 's,\($*\)\.o[ :]*,o/\1.o $@ : ,g' < $@.$$$$ > $@; \ |
---|
| 28 | rm -f $@.$$$$ |
---|
| 29 | |
---|
| 30 | cmdline.cc cmdline.h : cmdline.ggo |
---|
| 31 | gengetopt --c-extension=cc -i cmdline.ggo |
---|
| 32 | |
---|
| 33 | clean: |
---|
| 34 | rm ${bin} ${objs} cmdline.cc cmdline.h |
---|
| 35 | rm -rf *.d |
---|
| 36 | |
---|
| 37 | prof: dgp |
---|
| 38 | gprof dgp ~/tmp/dgp-pl/gmon.out > dgp.prof |
---|
Note: See
TracBrowser
for help on using the repository browser.