Last change
on this file since 243d027 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
|
Rev | Line | |
---|
[5f4d9c3] | 1 | include ../../config.mak |
---|
| 2 | |
---|
| 3 | ifeq ($(BUILD_STATIC), yes) |
---|
| 4 | LDFLAGS += -static |
---|
| 5 | endif |
---|
| 6 | |
---|
| 7 | LDFLAGS += |
---|
| 8 | CXXFLAGS += -O2 -fpermissive |
---|
| 9 | |
---|
| 10 | LIB_PATH=../lib |
---|
| 11 | COMMON_PATH=../common |
---|
| 12 | CMDLINE_FILE='"../gue/cmdline.h"' |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | gue: main.cc guess.o $(LIB_PATH)/auttools.o $(LIB_PATH)/word.o \ |
---|
| 16 | cmdline.c common_guess.o common.o |
---|
| 17 | $(CXX) $(CXXFLAGS) main.cc guess.o \ |
---|
| 18 | $(LIB_PATH)/auttools.o $(LIB_PATH)/word.o cmdline.c common.o common_guess.o \ |
---|
| 19 | -o gue $(LDFLAGS) |
---|
| 20 | |
---|
| 21 | guess.o: guess.h guess.cc |
---|
| 22 | $(CXX) $(CXXFLAGS) -c guess.cc |
---|
| 23 | |
---|
| 24 | common_guess.o: cmdline.h common_guess.cc common_guess.h |
---|
| 25 | $(CXX) $(CXXFLAGS) -c common_guess.cc |
---|
| 26 | |
---|
| 27 | common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \ |
---|
| 28 | $(COMMON_PATH)/common.h |
---|
| 29 | $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc |
---|
| 30 | |
---|
| 31 | cmdline.c cmdline.h: cmdline.ggo |
---|
| 32 | $(GENGETOPT) -i cmdline.ggo --conf-parser |
---|
| 33 | |
---|
| 34 | cmdline.ggo: cmdline_guess.ggo $(COMMON_PATH)/cmdline_common.ggo |
---|
| 35 | cat cmdline_guess.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | clean: clean.cmdline |
---|
| 39 | rm *.o || true |
---|
| 40 | rm gue || true |
---|
| 41 | |
---|
| 42 | clean.cmdline: |
---|
| 43 | rm cmdline.* || true |
---|
| 44 | |
---|
| 45 | .PHONY: install |
---|
| 46 | install: |
---|
| 47 | ifdef BIN_DIR |
---|
| 48 | install -m 0755 gue $(BIN_DIR) |
---|
| 49 | endif |
---|
| 50 | |
---|
| 51 | .PHONY: uninstall |
---|
| 52 | uninstall: |
---|
| 53 | ifdef BIN_DIR |
---|
| 54 | rm $(BIN_DIR)/gue |
---|
| 55 | endif |
---|
Note: See
TracBrowser
for help on using the repository browser.