Last change
on this file since f924e4b 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.5 KB
|
Line | |
---|
1 | include ../../config.mak |
---|
2 | |
---|
3 | # because of OpenFST this application cannot be compiled statically, yet |
---|
4 | #ifeq ($(BUILD_STATIC), yes) |
---|
5 | # LDFLAGS += -static |
---|
6 | #endif |
---|
7 | |
---|
8 | LDFLAGS += -ldl -lfst |
---|
9 | CXXFLAGS += -g -fpermissive |
---|
10 | |
---|
11 | LIB_PATH=../lib |
---|
12 | COMMON_PATH=../common |
---|
13 | CMDLINE_FILE='"../lem_utf8/cmdline.h"' |
---|
14 | |
---|
15 | |
---|
16 | lem: main.cc lem.o lemfst.o $(LIB_PATH)/auttools.o $(LIB_PATH)/word.o \ |
---|
17 | cmdline.c common_lem.o common.o symtab.o |
---|
18 | $(CXX) $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) \ |
---|
19 | main.cc lem.o lemfst.o $(LIB_PATH)/auttools.o \ |
---|
20 | $(LIB_PATH)/word.o cmdline.c common.o common_lem.o \ |
---|
21 | symtab.o -o lem $(LDFLAGS) |
---|
22 | |
---|
23 | lem.o: lem.h lem.cc |
---|
24 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) lem.cc |
---|
25 | |
---|
26 | common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \ |
---|
27 | $(COMMON_PATH)/common.h |
---|
28 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc |
---|
29 | |
---|
30 | common_lem.o: cmdline.h common_lem.h common_lem.cc |
---|
31 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_lem.cc |
---|
32 | |
---|
33 | cmdline.c cmdline.h: cmdline.ggo |
---|
34 | $(GENGETOPT) -i cmdline.ggo --conf-parser |
---|
35 | |
---|
36 | cmdline.ggo: cmdline_lem.ggo ../common/cmdline_common.ggo |
---|
37 | cat cmdline_lem.ggo ../common/cmdline_common.ggo > cmdline.ggo |
---|
38 | |
---|
39 | symtab.o: $(LIB_PATH)/symtab.h $(LIB_PATH)/symtab.cc |
---|
40 | $(CXX) $(CXXFLAGS) -c $(LIB_PATH)/symtab.cc |
---|
41 | |
---|
42 | clean: clean.cmdline |
---|
43 | rm *.o || true |
---|
44 | rm lem || true |
---|
45 | |
---|
46 | clean.cmdline: |
---|
47 | rm cmdline.* || true |
---|
48 | |
---|
49 | lemfst.o: |
---|
50 | $(CXX) -c lemfst.cpp $(CXXFLAGS) -o lemfst.o |
---|
51 | |
---|
52 | .PHONY: install |
---|
53 | install: |
---|
54 | ifdef BIN_DIR |
---|
55 | install -m 0755 lem $(BIN_DIR) |
---|
56 | endif |
---|
57 | |
---|
58 | .PHONY: uninstall |
---|
59 | uninstall: |
---|
60 | ifdef BIN_DIR |
---|
61 | rm $(BIN_DIR)/lem |
---|
62 | endif |
---|
Note: See
TracBrowser
for help on using the repository browser.