Last change
on this file since f600a02 was
5f4d9c3,
checked in by Maciej Prill <mprill@…>, 13 years ago
|
Rewritten the build system, added lem UTF-8 version.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | include ../../config.mak |
---|
2 | |
---|
3 | ifeq ($(BUILD_STATIC), yes) |
---|
4 | LDFLAGS += -static |
---|
5 | endif |
---|
6 | |
---|
7 | CXXFLAGS += -fpermissive -O2 |
---|
8 | |
---|
9 | LIB_PATH=../lib |
---|
10 | COMMON_PATH=../common |
---|
11 | CMDLINE_FILE='"../kor/cmdline.h"' |
---|
12 | |
---|
13 | |
---|
14 | kor: main.cc corr.o corlist.o cmdline.o $(LIB_PATH)/word.o \ |
---|
15 | $(LIB_PATH)/auttools.o cmdline.c common_cor.o common.o |
---|
16 | $(CXX) $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) main.cc corlist.o corr.o common.o \ |
---|
17 | $(LIB_PATH)/word.o $(LIB_PATH)/auttools.o cmdline.c common_cor.o \ |
---|
18 | -o kor $(LDFLAGS) |
---|
19 | |
---|
20 | corr.o: corr.cc corr.hh cmdline.h |
---|
21 | $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) corr.cc |
---|
22 | |
---|
23 | corlist.o: corlist.cc corlist.h cmdline.h |
---|
24 | $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) corlist.cc |
---|
25 | |
---|
26 | common.o: cmdline.h $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \ |
---|
27 | $(COMMON_PATH)/common.h |
---|
28 | $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc |
---|
29 | |
---|
30 | common_cor.o: cmdline.h common_cor.cc common_cor.h |
---|
31 | $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) common_cor.cc |
---|
32 | |
---|
33 | cmdline.c cmdline.h: cmdline.ggo |
---|
34 | $(GENGETOPT) -i cmdline.ggo --conf-parser |
---|
35 | |
---|
36 | cmdline.ggo: cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo |
---|
37 | cat cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo |
---|
38 | |
---|
39 | .PHONY: install |
---|
40 | install: |
---|
41 | ifdef BIN_DIR |
---|
42 | install -m 0755 kor $(BIN_DIR) |
---|
43 | endif |
---|
44 | |
---|
45 | .PHONY: uninstall |
---|
46 | uninstall: |
---|
47 | ifdef BIN_DIR |
---|
48 | rm $(BIN_DIR)/kor |
---|
49 | endif |
---|
50 | |
---|
51 | clean: clean.cmdline |
---|
52 | rm *.o || true |
---|
53 | rm kor || true |
---|
54 | |
---|
55 | clean.cmdline: |
---|
56 | rm cmdline.* || true |
---|
Note: See
TracBrowser
for help on using the repository browser.