Debian Codegraph @

src/unittests/Makefile

raw
1 include ../../common.mk
2 AINC = ../../include
3 CXX ?= g++
4 CXXFLAGS := -std=c++11 -Wall -pedantic -pthread ${CXXFLAGS}
5 LDFLAGS = -L../googletest -lgtest -lgtest_main -lgsl -lgslcblas -lmysqlclient -lmysqlpp \
6 -lsqlite3 -llpsolve55 -lcolamd -ldl -lboost_iostreams
7 LDFLAGS += $(LIBRARY_PATH_LPSOLVE) $(LIBRARY_PATH_GSL) $(LIBRARY_PATH_SUITESPARSE)
8 LDFLAGS += $(LIBRARY_PATH_MYSQL)
9 LDFLAGS += $(LIBRARY_PATH_SQLITE)
10 LDFLAGS += $(LIBRARY_PATH_BOOST)
11 INCLS += -I$(AINC) -isystem ../googletest/include
12 INCLUDE_PATH_MYSQL ?= -I/usr/include/mysql # set the default (ubuntu/debian) location if it has not already been set in common.mk
13 INCLS += $(INCLUDE_PATH_MYSQL)
14 INCLS += $(INCLUDE_PATH_GSL)
15 OBJS = ../lldouble.o ../fasta.o ../contTimeMC.o ../codonevo.o \
16 ../properties.o ../types.o \
17 ../geneticcode.o ../phylotree.o ../geneMSA.o ../alignment.o \
18 ../orthoexon.o ../exoncand.o ../intronmodel.o ../introntrain.o \
19 ../merkmal.o ../motif.o ../namgene.o ../gene.o ../pp_profile.o \
20 ../pp_scoring.o ../pp_hitseq.cc ../vitmatrix.o \
21 ../extrinsicinfo.o ../hints.o ../igenicmodel.o ../igenictrain.o \
22 ../statemodel.o ../utrmodel.o ../utrtrain.o ../exontrain.o ../exonmodel.o \
23 ../commontrain.o ../ncmodel.o ../evaluation.o ../projectio.o \
24 ../mea.o ../meaPath.o ../speciesgraph.o ../graph.o ../randseqaccess.o \
25 ../sqliteDB.o ../genbank.o \
26 ../scanner/lex.o ../parser/parse.o \
27
28 # Link all tests to a single test binary
29 unittests: lldouble_unittest.o fasta_unittest.o evo_unittest.o codonevo_unittest.o alignment_unittest.o
30 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) \
31 lldouble_unittest.o fasta_unittest.o evo_unittest.o codonevo_unittest.o alignment_unittest.o \
32 $(OBJS) $(LDFLAGS) -o unittests
33 #evo_unittest.o \
34 # Here follows each individual Unit Test
35 lldouble_unittest.o: lldouble_unittest.cc $(AINC)/lldouble.hh
36 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) -c lldouble_unittest.cc
37
38 fasta_unittest.o: fasta_unittest.cc $(AINC)/fasta.hh
39 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) -c fasta_unittest.cc
40
41 evo_unittest.o: evo_unittest.cc $(AINC)/contTimeMC.hh
42 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) -c evo_unittest.cc
43
44 codonevo_unittest.o: codonevo_unittest.cc $(AINC)/contTimeMC.hh $(AINC)/codonevo.hh
45 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) -c codonevo_unittest.cc
46
47 alignment_unittest.o: alignment_unittest.cc $(AINC)/alignment.hh
48 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) -c alignment_unittest.cc
49
50 # execute all tests: run test binary
51 test: unittests
52 ./unittests
53
54 clean:
55 rm -f *.o unittests