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