Last change
on this file since 354ba3d 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.2 KB
|
Line | |
---|
1 | include ../../config.mak |
---|
2 | |
---|
3 | ifeq ($(BUILD_STATIC), yes) |
---|
4 | LDFLAGS += -static |
---|
5 | endif |
---|
6 | |
---|
7 | LDFLAGS += |
---|
8 | CXXFLAGS += -O2 -fpermissive |
---|
9 | |
---|
10 | LIB_PATH=../lib |
---|
11 | COMMON_PATH=../common |
---|
12 | CMDLINE_FILE='"../cor/cmdline.h"' |
---|
13 | |
---|
14 | all: cor |
---|
15 | |
---|
16 | cor: main.cc corr.o $(LIB_PATH)/word.o \ |
---|
17 | $(LIB_PATH)/auttools.o cmdline.c common_cor.o common.o |
---|
18 | $(CXX) $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) main.cc corr.o common.o \ |
---|
19 | $(LIB_PATH)/word.o $(LIB_PATH)/auttools.o cmdline.c common_cor.o \ |
---|
20 | -o cor $(LDFLAGS) |
---|
21 | |
---|
22 | corr.o: corr.cc corr.hh |
---|
23 | $(CXX) $(CXXFLAGS) -c corr.cc |
---|
24 | |
---|
25 | common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \ |
---|
26 | $(COMMON_PATH)/common.h |
---|
27 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc |
---|
28 | |
---|
29 | common_cor.o: cmdline.h common_cor.cc common_cor.h |
---|
30 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_cor.cc |
---|
31 | |
---|
32 | cmdline.c cmdline.h: cmdline.ggo |
---|
33 | $(GENGETOPT) -i cmdline.ggo --conf-parser |
---|
34 | |
---|
35 | cmdline.ggo: cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo |
---|
36 | cat cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo |
---|
37 | |
---|
38 | .PHONY: install |
---|
39 | install: |
---|
40 | ifdef BIN_DIR |
---|
41 | install -m 0755 cor $(BIN_DIR) |
---|
42 | endif |
---|
43 | |
---|
44 | .PHONY: uninstall |
---|
45 | uninstall: |
---|
46 | ifdef BIN_DIR |
---|
47 | rm $(BIN_DIR)/cor |
---|
48 | endif |
---|
49 | |
---|
50 | clean: clean.cmdline |
---|
51 | rm *.o || true |
---|
52 | rm cor || true |
---|
53 | |
---|
54 | clean.cmdline: |
---|
55 | rm cmdline.* || true |
---|
56 | |
---|
Note: See
TracBrowser
for help on using the repository browser.