Last change
on this file since c21bdd6 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 |
---|
9 | |
---|
10 | LIB_PATH=../lib |
---|
11 | CMDLINE_FILE='"../tok.c/cmdline.h"' |
---|
12 | COMMON_PATH=../common |
---|
13 | |
---|
14 | tok_c: tok.o cmdline.c common_tok.o common.o |
---|
15 | $(CXX) $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) \ |
---|
16 | tok.c cmdline.c common.o common_tok.o -o tok_c $(LDFLAGS) |
---|
17 | |
---|
18 | tok.o: tok.c cmdline.h |
---|
19 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) tok.c |
---|
20 | |
---|
21 | common_tok.o: cmdline.h common_tok.cc common_tok.h |
---|
22 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_tok.cc |
---|
23 | |
---|
24 | common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \ |
---|
25 | $(COMMON_PATH)/common.h |
---|
26 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc |
---|
27 | |
---|
28 | cmdline.ggo: cmdline_tok.ggo ../common/cmdline_common.ggo |
---|
29 | cat cmdline_tok.ggo ../common/cmdline_common.ggo > cmdline.ggo |
---|
30 | |
---|
31 | cmdline.c cmdline.h: cmdline.ggo |
---|
32 | $(GENGETOPT) -i cmdline.ggo --conf-parser |
---|
33 | |
---|
34 | .PHONY: install |
---|
35 | install: |
---|
36 | ifdef BIN_DIR |
---|
37 | install -m 0755 tok_c $(BIN_DIR) |
---|
38 | endif |
---|
39 | |
---|
40 | .PHONY: uninstall |
---|
41 | uninstall: |
---|
42 | ifdef BIN_DIR |
---|
43 | rm $(BIN_DIR)/tok_c |
---|
44 | endif |
---|
45 | |
---|
46 | clean: clean.cmdline |
---|
47 | rm *.o || true |
---|
48 | rm tok_c || true |
---|
49 | |
---|
50 | clean.cmdline: |
---|
51 | rm cmdline.* || true |
---|
Note: See
TracBrowser
for help on using the repository browser.