source: src/lem/Makefile @ e0cd003

Last change on this file since e0cd003 was cfdf333, checked in by Tomasz Obrebski <to@…>, 13 years ago

Naprawy dotyczace oblugi plikow konfiguracyjnych.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1include ../../config.mak
2
3LDFLAGS += -static
4CXXFLAGS += -O2 -fpermissive
5
6LIB_PATH=../lib
7COMMON_PATH=../common
8CMDLINE_FILE='"../lem/cmdline.h"'
9
10
11lem: main.cc lem.o  $(LIB_PATH)/auttools.o $(LIB_PATH)/word.o \
12      cmdline.c common_lem.o common.o symtab.o
13        g++ $(CXXFLAGS) $(LDFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) \
14        main.cc lem.o $(LIB_PATH)/auttools.o \
15        $(LIB_PATH)/word.o cmdline.c common.o common_lem.o \
16        symtab.o -o lem
17
18lem.o: lem.h lem.cc
19        g++ $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) lem.cc
20
21common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \
22         $(COMMON_PATH)/common.h
23        g++ $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc
24
25common_lem.o: cmdline.h common_lem.h common_lem.cc
26        g++ $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_lem.cc
27
28cmdline.c cmdline.h: cmdline.ggo
29        gengetopt -i cmdline.ggo --conf-parser
30
31cmdline.ggo: cmdline_lem.ggo ../common/cmdline_common.ggo
32        cat cmdline_lem.ggo ../common/cmdline_common.ggo > cmdline.ggo
33
34symtab.o: $(LIB_PATH)/symtab.h $(LIB_PATH)/symtab.cc
35        g++ $(CXXFLAGS) -c $(LIB_PATH)/symtab.cc
36
37clean: clean.cmdline
38        rm *.o || true
39        rm lem || true
40
41clean.cmdline:
42        rm cmdline.* || true
43
44.PHONY: install
45install:
46ifdef BIN_DIR
47        install -m 0755 lem $(BIN_DIR)
48endif
49
50.PHONY: uninstall
51uninstall:
52ifdef BIN_DIR
53        rm $(BIN_DIR)/lem
54endif
Note: See TracBrowser for help on using the repository browser.