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