help
Rev | Line | |
---|
[0214596] | 1 | |
---|
| 2 | |
---|
| 3 | SHELL = /bin/sh |
---|
| 4 | |
---|
[b6109b9] | 5 | #vpath %.o . |
---|
[0214596] | 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 |
---|
[b6109b9] | 15 | objs = $(sources:%.cc=%.o) |
---|
[0214596] | 16 | |
---|
| 17 | ${bin}: ${objs} |
---|
| 18 | ${CXX} ${CXXFLAGS} -o $@ ${objs} |
---|
| 19 | |
---|
| 20 | include $(sources:.cc=.d) |
---|
| 21 | |
---|
[b6109b9] | 22 | %.o: %.cc |
---|
[0214596] | 23 | ${CXX} -c ${CXXFLAGS} -o $@ $< |
---|
| 24 | |
---|
| 25 | %.d: %.cc |
---|
| 26 | $(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \ |
---|
[b6109b9] | 27 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ |
---|
[0214596] | 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 |
---|
[b6109b9] | 39 | |
---|
| 40 | copy: |
---|
| 41 | ifdef UTT_BIN_DIR |
---|
| 42 | cp dgp dgc canonize $(UTT_BIN_DIR) |
---|
| 43 | endif |
---|
Note: See
TracBrowser
for help on using the repository browser.