[1e121f4] | 1 | PAR=-Wno-deprecated -O2 -fpermissive -static |
---|
| 2 | PAR2=-c -Wno-deprecated -O2 -fpermissive -static |
---|
[25ae32e] | 3 | LIB_PATH=../lib |
---|
| 4 | COMMON_PATH=../common |
---|
| 5 | CMDLINE_FILE='"../lem/cmdline.h"' |
---|
| 6 | |
---|
| 7 | |
---|
[1e121f4] | 8 | lem: main.cc lem.o auttools.o word.o cmdline.c common_lem.o common.o symtab.o |
---|
[13a8a67] | 9 | g++ $(PAR) -D _CMDLINE_FILE=$(CMDLINE_FILE) \ |
---|
| 10 | main.cc lem.o $(LIB_PATH)/auttools.o \ |
---|
[25ae32e] | 11 | $(LIB_PATH)/word.o cmdline.c common.o common_lem.o \ |
---|
| 12 | symtab.o -o lem |
---|
| 13 | |
---|
| 14 | lem.o: lem.h lem.cc |
---|
[13a8a67] | 15 | g++ $(PAR2) -D _CMDLINE_FILE=$(CMDLINE_FILE) lem.cc |
---|
[25ae32e] | 16 | |
---|
| 17 | # alphabet.o: $(LIB_PATH)/alphabet.h $(LIB_PATH)/alphabet.cc |
---|
| 18 | # g++ $(PAR2) $(LIB_PATH)/alphabet.cc |
---|
| 19 | |
---|
| 20 | # auttools.o: $(LIB_PATH)/auttools.h $(LIB_PATH)/auttools.cc |
---|
| 21 | # g++ $(PAR2) $(LIB_PATH)/auttools.cc |
---|
| 22 | |
---|
| 23 | # word.o: $(LIB_PATH)/word.h $(LIB_PATH)/word.cc |
---|
| 24 | # g++ $(PAR2) $(LIB_PATH)/word.cc |
---|
| 25 | |
---|
| 26 | # erro.o: $(LIB_PATH)/erro.h $(LIB_PATH)/erro.cc |
---|
| 27 | # g++ $(PAR2) $(LIB_PATH)/erro.cc |
---|
| 28 | |
---|
[1e121f4] | 29 | common.o: cmdline_common |
---|
[25ae32e] | 30 | g++ $(PAR2) -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc |
---|
| 31 | |
---|
| 32 | common_lem.o: cmdline.h common_lem.h common_lem.cc |
---|
[13a8a67] | 33 | g++ $(PAR2) -D _CMDLINE_FILE=$(CMDLINE_FILE) common_lem.cc |
---|
[25ae32e] | 34 | |
---|
| 35 | cmdline.c cmdline.h: cmdline.ggo |
---|
| 36 | gengetopt -i cmdline.ggo --conf-parser |
---|
| 37 | |
---|
[1e121f4] | 38 | cmdline.ggo: cmdline_lem.ggo $(COMMON_PATH)/cmdline_common.ggo |
---|
[25ae32e] | 39 | cat cmdline_lem.ggo ../common/cmdline_common.ggo > cmdline.ggo |
---|
| 40 | |
---|
| 41 | symtab.o: $(LIB_PATH)/symtab.h $(LIB_PATH)/symtab.cc |
---|
| 42 | g++ $(PAR2) $(LIB_PATH)/symtab.cc |
---|
| 43 | |
---|
| 44 | clean: clean.cmdline |
---|
| 45 | rm *.o || true |
---|
| 46 | rm lem || true |
---|
| 47 | |
---|
| 48 | clean.cmdline: |
---|
| 49 | rm cmdline.* || true |
---|
| 50 | |
---|
| 51 | copy: |
---|
| 52 | ifdef UTT_BIN_DIR |
---|
| 53 | cp lem $(UTT_BIN_DIR) |
---|
| 54 | endif |
---|
[1e121f4] | 55 | |
---|
| 56 | include $(COMMON_PATH)/common.mk |
---|
| 57 | include $(LIB_PATH)/lib.mk |
---|