source: src/tok.c/Makefile @ f924e4b

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.2 KB
Line 
1include ../../config.mak
2
3ifeq ($(BUILD_STATIC), yes)
4  LDFLAGS += -static
5endif
6
7LDFLAGS += 
8CXXFLAGS += -O2
9
10LIB_PATH=../lib
11CMDLINE_FILE='"../tok.c/cmdline.h"'
12COMMON_PATH=../common
13
14tok_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
18tok.o: tok.c cmdline.h
19        $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) tok.c
20
21common_tok.o: cmdline.h  common_tok.cc common_tok.h
22        $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_tok.cc
23
24common.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
28cmdline.ggo: cmdline_tok.ggo ../common/cmdline_common.ggo
29        cat cmdline_tok.ggo ../common/cmdline_common.ggo > cmdline.ggo
30
31cmdline.c cmdline.h: cmdline.ggo
32        $(GENGETOPT) -i cmdline.ggo --conf-parser
33
34.PHONY: install
35install:
36ifdef BIN_DIR
37        install -m 0755 tok_c $(BIN_DIR)
38endif
39
40.PHONY: uninstall
41uninstall:
42ifdef BIN_DIR
43        rm $(BIN_DIR)/tok_c
44endif
45
46clean: clean.cmdline
47        rm *.o || true
48        rm tok_c || true
49
50clean.cmdline:
51        rm cmdline.* || true
Note: See TracBrowser for help on using the repository browser.