source: src/lem_utf8/Makefile @ 56c300b

Last change on this file since 56c300b 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
RevLine 
[5f4d9c3]1include ../../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
8LDFLAGS += -ldl -lfst
9CXXFLAGS += -g  -fpermissive
10
11LIB_PATH=../lib
12COMMON_PATH=../common
13CMDLINE_FILE='"../lem_utf8/cmdline.h"'
14
15
16lem: 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
23lem.o: lem.h lem.cc
24        $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) lem.cc
25
26common.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
30common_lem.o: cmdline.h common_lem.h common_lem.cc
31        $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_lem.cc
32
33cmdline.c cmdline.h: cmdline.ggo
34        $(GENGETOPT) -i cmdline.ggo --conf-parser
35
36cmdline.ggo: cmdline_lem.ggo ../common/cmdline_common.ggo
37        cat cmdline_lem.ggo ../common/cmdline_common.ggo > cmdline.ggo
38
39symtab.o: $(LIB_PATH)/symtab.h $(LIB_PATH)/symtab.cc
40        $(CXX) $(CXXFLAGS) -c $(LIB_PATH)/symtab.cc
41
42clean: clean.cmdline
43        rm *.o || true
44        rm lem || true
45
46clean.cmdline:
47        rm cmdline.* || true
48
49lemfst.o:
50        $(CXX) -c lemfst.cpp $(CXXFLAGS) -o lemfst.o
51
52.PHONY: install
53install:
54ifdef BIN_DIR
55        install -m 0755 lem $(BIN_DIR)
56endif
57
58.PHONY: uninstall
59uninstall:
60ifdef BIN_DIR
61        rm $(BIN_DIR)/lem
62endif
Note: See TracBrowser for help on using the repository browser.