include ../../config.mak ifeq ($(BUILD_STATIC), yes) LDFLAGS += -static endif CXXFLAGS += -fpermissive -O2 LIB_PATH=../lib COMMON_PATH=../common CMDLINE_FILE='"../kor/cmdline.h"' kor: main.cc corr.o corlist.o cmdline.o $(LIB_PATH)/word.o \ $(LIB_PATH)/auttools.o cmdline.c common_cor.o common.o $(CXX) $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) main.cc corlist.o corr.o common.o \ $(LIB_PATH)/word.o $(LIB_PATH)/auttools.o cmdline.c common_cor.o \ -o kor $(LDFLAGS) corr.o: corr.cc corr.hh cmdline.h $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) corr.cc corlist.o: corlist.cc corlist.h cmdline.h $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) corlist.cc common.o: cmdline.h $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \ $(COMMON_PATH)/common.h $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) $(COMMON_PATH)/common.cc common_cor.o: cmdline.h common_cor.cc common_cor.h $(CXX) -c $(CXXFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) common_cor.cc cmdline.c cmdline.h: cmdline.ggo $(GENGETOPT) -i cmdline.ggo --conf-parser cmdline.ggo: cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo cat cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo .PHONY: install install: ifdef BIN_DIR install -m 0755 kor $(BIN_DIR) endif .PHONY: uninstall uninstall: ifdef BIN_DIR rm $(BIN_DIR)/kor endif clean: clean.cmdline rm *.o || true rm kor || true clean.cmdline: rm cmdline.* || true