source: src/kor/Makefile @ d2f119e

Last change on this file since d2f119e 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
RevLine 
[5f4d9c3]1include ../../config.mak
2
3ifeq ($(BUILD_STATIC), yes)
4  LDFLAGS += -static
5endif
6
7CXXFLAGS += -fpermissive -O2
8
9LIB_PATH=../lib
10COMMON_PATH=../common
11CMDLINE_FILE='"../kor/cmdline.h"'
12
13
14kor: 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
20corr.o: corr.cc corr.hh cmdline.h
21        $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) corr.cc
22       
23corlist.o: corlist.cc corlist.h cmdline.h
24        $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) corlist.cc
25       
26common.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
30common_cor.o: cmdline.h common_cor.cc common_cor.h
31        $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) common_cor.cc
32
33cmdline.c cmdline.h: cmdline.ggo
34        $(GENGETOPT) -i cmdline.ggo --conf-parser
35
36cmdline.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
40install:
41ifdef BIN_DIR
42        install -m 0755 kor $(BIN_DIR)
43endif
44
45.PHONY: uninstall
46uninstall:
47ifdef BIN_DIR
48        rm $(BIN_DIR)/kor
49endif
50
51clean: clean.cmdline
52        rm *.o || true
53        rm kor || true
54
55clean.cmdline:
56        rm cmdline.* || true
Note: See TracBrowser for help on using the repository browser.