source: src/gue/Makefile @ 5f4d9c3

Last change on this file since 5f4d9c3 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 -fpermissive
9
10LIB_PATH=../lib
11COMMON_PATH=../common
12CMDLINE_FILE='"../gue/cmdline.h"'
13
14
15gue: 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
21guess.o: guess.h guess.cc
22        $(CXX) $(CXXFLAGS) -c guess.cc
23
24common_guess.o: cmdline.h  common_guess.cc common_guess.h
25        $(CXX) $(CXXFLAGS) -c common_guess.cc
26
27common.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
31cmdline.c cmdline.h: cmdline.ggo
32        $(GENGETOPT) -i cmdline.ggo --conf-parser
33
34cmdline.ggo: cmdline_guess.ggo $(COMMON_PATH)/cmdline_common.ggo
35        cat cmdline_guess.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo
36
37
38clean: clean.cmdline
39        rm *.o || true
40        rm gue || true
41
42clean.cmdline:
43        rm cmdline.* || true
44
45.PHONY: install
46install:
47ifdef BIN_DIR
48        install -m 0755 gue $(BIN_DIR)
49endif
50
51.PHONY: uninstall
52uninstall:
53ifdef BIN_DIR
54        rm $(BIN_DIR)/gue
55endif
Note: See TracBrowser for help on using the repository browser.