| 1 |
# Makefile for homGeneMapping |
| 2 |
|
| 3 |
include ../../../common.mk |
| 4 |
|
| 5 |
CXX ?= g++ |
| 6 |
|
| 7 |
# Notes: - "-Wno-sign-compare" eliminates a high number of warnings (see footnote below). Please adopt |
| 8 |
# a strict signed-only usage strategy to avoid mistakes since we are not warned about this. |
| 9 |
# - The order of object files in $(OBJS) IS IMPORTANT (see lldouble.hh) |
| 10 |
CXXFLAGS := -Wall -Wno-sign-compare -ansi -pedantic -std=c++0x -pthread -O2 ${CXXFLAGS} |
| 11 |
|
| 12 |
INCLS += -I../include |
| 13 |
OBJS = gene.o genome.o |
| 14 |
|
| 15 |
# set SQLITE = false in common.mk to disable the usage of the SQLite library, option --dbaccess will not be available |
| 16 |
# set BOOST = false in common.mk to disable the usage of the Boost graph library, the option --printHomologs will not be available |
| 17 |
BOOST ?= true |
| 18 |
|
| 19 |
ifeq (,$(findstring $(COMPGENEPRED),0 false False FALSE)) # if COMPGENEPRED is not defined or not contains 0, false, False or FALSE |
| 20 |
# comment this flag to disable database access for retrieval of hints, the option --dbaccess will not be available |
| 21 |
SQLITE ?= true |
| 22 |
endif |
| 23 |
|
| 24 |
ifeq (,$(findstring $(BOOST),0 false False FALSE)) # if BOOST is not defined or not contains 0, false, False or FALSE |
| 25 |
CPPFLAGS += -DBOOST |
| 26 |
INCLS += $(INCLUDE_PATH_BOOST) # set boost include path in INCLUDE_PATH_BOOST, if boost is not installed system-wide |
| 27 |
LDFLAGS += $(LIBRARY_PATH_BOOST) # set boost library path in LIBRARY_PATH_BOOST, if boost is not installed system-wide |
| 28 |
endif |
| 29 |
|
| 30 |
ifneq (,$(findstring $(SQLITE),1 true True TRUE)) # if SQLITE is defined and contains 1, true, True or TRUE |
| 31 |
CPPFLAGS += -DM_SQLITE |
| 32 |
INCLS += $(INCLUDE_PATH_SQLITE) |
| 33 |
LDFLAGS += $(LIBRARY_PATH_SQLITE) |
| 34 |
LDLIBS += -lsqlite3 # add the sqlite library path here, if sqlite is not install system-wide |
| 35 |
OBJS += sqliteDB.o |
| 36 |
endif |
| 37 |
|
| 38 |
.PHONY: all clean |
| 39 |
|
| 40 |
all: homGeneMapping |
| 41 |
|
| 42 |
homGeneMapping: main.cc $(OBJS) |
| 43 |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(INCLS) -o $@ $^ $(LDLIBS) |
| 44 |
mkdir -p ../../../bin/ |
| 45 |
cp -f homGeneMapping ../../../bin/homGeneMapping |
| 46 |
|
| 47 |
$(OBJS): %.o: %.cc |
| 48 |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) -c $< |
| 49 |
|
| 50 |
clean: |
| 51 |
rm -f homGeneMapping $(OBJS) |
| 52 |
rm -f ../../../bin/homGeneMapping |
| 53 |
|
| 54 |
main.o : \ |
| 55 |
../include/genome.hh \ |
| 56 |
../include/projectio.hh \ |
| 57 |
main.cc |
| 58 |
|
| 59 |
gene.o : \ |
| 60 |
../include/gene.hh \ |
| 61 |
../include/projectio.hh \ |
| 62 |
gene.cc |
| 63 |
|
| 64 |
genome.o : \ |
| 65 |
../include/genome.hh \ |
| 66 |
../include/bitmasking.hh \ |
| 67 |
../include/gene.hh \ |
| 68 |
genome.cc |
| 69 |
|
| 70 |
sqliteDB.o: \ |
| 71 |
../include/sqliteDB.hh \ |
| 72 |
sqliteDB.cc |