source: src/lem/Makefile @ 2ff1f65

Last change on this file since 2ff1f65 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 
1LDFLAGS += -static
2CXXFLAGS += -O2 -fpermissive
3
4LIB_PATH=../lib
5COMMON_PATH=../common
6CMDLINE_FILE='"../lem/cmdline.h"'
7
8
9lem: main.cc lem.o  $(LIB_PATH)/auttools.o $(LIB_PATH)/word.o \
10      cmdline.c common_lem.o common.o symtab.o
11        g++ $(CXXFLAGS) $(LDFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) \
12        main.cc lem.o $(LIB_PATH)/auttools.o \
13        $(LIB_PATH)/word.o cmdline.c common.o common_lem.o \
14        symtab.o -o lem
15
16lem.o: lem.h lem.cc
17        g++ $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) lem.cc
18
19common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \
20         $(COMMON_PATH)/common.h
21        g++ $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc
22
23common_lem.o: cmdline.h common_lem.h common_lem.cc
24        g++ $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_lem.cc
25
26cmdline.c cmdline.h: cmdline.ggo
27        gengetopt -i cmdline.ggo --conf-parser
28
29cmdline.ggo: cmdline_lem.ggo ../common/cmdline_common.ggo
30        cat cmdline_lem.ggo ../common/cmdline_common.ggo > cmdline.ggo
31
32symtab.o: $(LIB_PATH)/symtab.h $(LIB_PATH)/symtab.cc
33        g++ $(CXXFLAGS) -c $(LIB_PATH)/symtab.cc
34
35clean: clean.cmdline
36        rm *.o || true
37        rm lem || true
38
39clean.cmdline:
40        rm cmdline.* || true
41
42copy:
43ifdef UTT_BIN_DIR
44        cp lem $(UTT_BIN_DIR)
45endif
Note: See TracBrowser for help on using the repository browser.