source: src/cor/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
RevLine 
[5f4d9c3]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='"../cor/cmdline.h"'
13
14all: cor
15
16cor: main.cc corr.o $(LIB_PATH)/word.o \
17        $(LIB_PATH)/auttools.o cmdline.c common_cor.o common.o
18        $(CXX) $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) main.cc corr.o common.o \
19        $(LIB_PATH)/word.o $(LIB_PATH)/auttools.o cmdline.c common_cor.o \
20        -o cor $(LDFLAGS)
21
22corr.o: corr.cc corr.hh
23        $(CXX) $(CXXFLAGS) -c corr.cc
24
25common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \
26         $(COMMON_PATH)/common.h
27        $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc
28
29common_cor.o: cmdline.h common_cor.cc common_cor.h
30        $(CXX) $(CXXFLAGS) -c -D _CMDLINE_FILE=$(CMDLINE_FILE) common_cor.cc
31
32cmdline.c cmdline.h: cmdline.ggo
33        $(GENGETOPT) -i cmdline.ggo --conf-parser
34
35cmdline.ggo: cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo
36        cat cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo
37
38.PHONY: install
39install:
40ifdef BIN_DIR
41        install -m 0755 cor $(BIN_DIR)
42endif
43
44.PHONY: uninstall
45uninstall:
46ifdef BIN_DIR
47        rm $(BIN_DIR)/cor
48endif
49
50clean: clean.cmdline
51        rm *.o || true
52        rm cor || true
53
54clean.cmdline:
55        rm cmdline.* || true
56
Note: See TracBrowser for help on using the repository browser.