source:
_old/app/src/dgp/Makefile
@
1e121f4
Last change on this file since 1e121f4 was 1e121f4, checked in by Adam Kędziora <s301614@…>, 14 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[0214596] | 1 | SHELL = /bin/sh |
[ff0fc99] | 2 | LIB_PATH=../../lib |
[28e9ae0] | 3 | COMMON_PATH=../common |
4 | CMDLINE_FILE='"../dgp/cmdline.h"' | |
5 | ||
[0214596] | 6 | |
[b6109b9] | 7 | #vpath %.o . |
[0214596] | 8 | |
[1e121f4] | 9 | CXXFLAGS = -O2 -static -fpermissive |
[0214596] | 10 | |
11 | sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp0.cc cmdline.cc \ | |
[28e9ae0] | 12 | $(COMMON_PATH)/common.cc global.cc |
[0214596] | 13 | |
[1e121f4] | 14 | bin = dgp dgc canonize tre |
[0214596] | 15 | |
16 | # plik *.o sa umieszczane w podkatalogu o | |
[b6109b9] | 17 | objs = $(sources:%.cc=%.o) |
[0214596] | 18 | |
19 | ${bin}: ${objs} | |
[13a8a67] | 20 | ${CXX} ${CXXFLAGS} -D _CMDLINE_FILE=$(CMDLINE_FILE) -o $@ ${objs} |
[0214596] | 21 | |
22 | include $(sources:.cc=.d) | |
23 | ||
[b6109b9] | 24 | %.o: %.cc |
[28e9ae0] | 25 | ${CXX} -D _CMDLINE_FILE=$(CMDLINE_FILE) -c ${CXXFLAGS} -o $@ $< |
[0214596] | 26 | |
27 | %.d: %.cc | |
[13a8a67] | 28 | $(CC) -MM $(CPPFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) $< > $@.$$$$; \ |
[b6109b9] | 29 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ |
[0214596] | 30 | rm -f $@.$$$$ |
31 | ||
[28e9ae0] | 32 | # stare: |
33 | # cmdline.cc cmdline.h : cmdline.ggo | |
34 | # gengetopt --c-extension=cc -i cmdline.ggo | |
35 | # nowe | |
36 | cmdline.cc cmdline.h: cmdline.ggo | |
37 | gengetopt -i cmdline.ggo --c-extension=cc --conf-parser | |
38 | ||
39 | cmdline.ggo: cmdline_dgp.ggo ../common/cmdline_common.ggo | |
40 | cat cmdline_dgp.ggo ../common/cmdline_common.ggo > cmdline.ggo | |
41 | # endnowe | |
42 | ||
[0214596] | 43 | |
44 | clean: | |
[1e121f4] | 45 | rm ${bin} ${objs} cmdline.cc cmdline.h *.d |
[0214596] | 46 | |
47 | prof: dgp | |
48 | gprof dgp ~/tmp/dgp-pl/gmon.out > dgp.prof | |
[b6109b9] | 49 | |
50 | copy: | |
51 | ifdef UTT_BIN_DIR | |
[b012e2a] | 52 | cp dgp dgc canonize tre $(UTT_BIN_DIR)/ |
[b6109b9] | 53 | endif |
Note: See TracBrowser
for help on using the repository browser.