Last change
on this file since 1e121f4 was
1e121f4,
checked in by Adam Kędziora <s301614@…>, 14 years ago
|
Replacing old implementation with working implementation
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | SHELL = /bin/sh |
---|
2 | LIB_PATH=../../lib |
---|
3 | COMMON_PATH=../common |
---|
4 | CMDLINE_FILE='"../dgp/cmdline.h"' |
---|
5 | |
---|
6 | |
---|
7 | #vpath %.o . |
---|
8 | |
---|
9 | CXXFLAGS = -O2 -static -fpermissive |
---|
10 | |
---|
11 | sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp0.cc cmdline.cc \ |
---|
12 | $(COMMON_PATH)/common.cc global.cc |
---|
13 | |
---|
14 | bin = dgp dgc canonize tre |
---|
15 | |
---|
16 | # plik *.o sa umieszczane w podkatalogu o |
---|
17 | objs = $(sources:%.cc=%.o) |
---|
18 | |
---|
19 | ${bin}: ${objs} |
---|
20 | ${CXX} ${CXXFLAGS} -D _CMDLINE_FILE=$(CMDLINE_FILE) -o $@ ${objs} |
---|
21 | |
---|
22 | include $(sources:.cc=.d) |
---|
23 | |
---|
24 | %.o: %.cc |
---|
25 | ${CXX} -D _CMDLINE_FILE=$(CMDLINE_FILE) -c ${CXXFLAGS} -o $@ $< |
---|
26 | |
---|
27 | %.d: %.cc |
---|
28 | $(CC) -MM $(CPPFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) $< > $@.$$$$; \ |
---|
29 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ |
---|
30 | rm -f $@.$$$$ |
---|
31 | |
---|
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 | |
---|
43 | |
---|
44 | clean: |
---|
45 | rm ${bin} ${objs} cmdline.cc cmdline.h *.d |
---|
46 | |
---|
47 | prof: dgp |
---|
48 | gprof dgp ~/tmp/dgp-pl/gmon.out > dgp.prof |
---|
49 | |
---|
50 | copy: |
---|
51 | ifdef UTT_BIN_DIR |
---|
52 | cp dgp dgc canonize tre $(UTT_BIN_DIR)/ |
---|
53 | endif |
---|
Note: See
TracBrowser
for help on using the repository browser.