Last change
on this file since abd28d1 was
e7de6cc,
checked in by Tomasz Obrebski <to@…>, 13 years ago
|
new version of dgp
added dgc, tre and compdic components
compiledic renamed to compdic_utf8
./configure updated
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | include ../../config.mak |
---|
2 | |
---|
3 | SHELL = /bin/sh |
---|
4 | LIB_PATH=../../lib |
---|
5 | COMMON_PATH=../common |
---|
6 | CMDLINE_FILE='"../dgp/cmdline.h"' |
---|
7 | |
---|
8 | #vpath %.o . |
---|
9 | |
---|
10 | ifeq ($(BUILD_STATIC), yes) |
---|
11 | LDFLAGS += -static |
---|
12 | endif |
---|
13 | |
---|
14 | CXXFLAGS += -O2 |
---|
15 | |
---|
16 | sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp0.cc cmdline.cc \ |
---|
17 | $(COMMON_PATH)/common.cc global.cc |
---|
18 | |
---|
19 | bin = dgp |
---|
20 | |
---|
21 | # plik *.o sa umieszczane w podkatalogu o |
---|
22 | objs = $(sources:%.cc=%.o) |
---|
23 | |
---|
24 | ${bin}: ${objs} |
---|
25 | $(CXX) $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) -o $@ ${objs} $(LDFLAGS) |
---|
26 | |
---|
27 | include $(sources:.cc=.d) |
---|
28 | |
---|
29 | %.o: %.cc |
---|
30 | $(CXX) -D _CMDLINE_FILE=$(CMDLINE_FILE) -c ${CXXFLAGS} -o $@ $< |
---|
31 | |
---|
32 | %.d: %.cc |
---|
33 | $(CC) -MM $(CPPFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) $< > $@.$$$$; \ |
---|
34 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ |
---|
35 | rm -f $@.$$$$ |
---|
36 | |
---|
37 | # stare: |
---|
38 | # cmdline.cc cmdline.h : cmdline.ggo |
---|
39 | # gengetopt --c-extension=cc -i cmdline.ggo |
---|
40 | # nowe |
---|
41 | cmdline.cc cmdline.h: cmdline.ggo |
---|
42 | $(GENGETOPT) -i cmdline.ggo --c-extension=cc --conf-parser |
---|
43 | |
---|
44 | cmdline.ggo: cmdline_dgp.ggo ../common/cmdline_common.ggo |
---|
45 | cat cmdline_dgp.ggo ../common/cmdline_common.ggo > cmdline.ggo |
---|
46 | # endnowe |
---|
47 | |
---|
48 | |
---|
49 | clean: |
---|
50 | rm ${bin} ${objs} cmdline.cc cmdline.h |
---|
51 | rm -rf *.d |
---|
52 | |
---|
53 | prof: dgp |
---|
54 | gprof dgp ~/tmp/dgp-pl/gmon.out > dgp.prof |
---|
55 | |
---|
56 | .PHONY: install |
---|
57 | install: |
---|
58 | ifdef BIN_DIR |
---|
59 | install -m 0755 dgp $(BIN_DIR) |
---|
60 | install -m 0755 dgc $(BIN_DIR) |
---|
61 | install -m 0755 canonize $(BIN_DIR) |
---|
62 | install -m 0755 tre $(BIN_DIR) |
---|
63 | endif |
---|
64 | |
---|
65 | .PHONY: uninstall |
---|
66 | uninstall: |
---|
67 | ifdef BIN_DIR |
---|
68 | rm $(BIN_DIR)/dgp |
---|
69 | rm $(BIN_DIR)/dgc |
---|
70 | rm $(BIN_DIR)/canonize |
---|
71 | rm $(BIN_DIR)/tre |
---|
72 | endif |
---|
Note: See
TracBrowser
for help on using the repository browser.