-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
48 lines (40 loc) · 1.57 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# check if kbase module
TOP_DIR = ../..
IN_KBASE=0
ifeq ($(wildcard TOP_DIR/tools/Makefile.common),'')
include $(TOP_DIR)/tools/Makefile.common
IN_KBASE=1
endif
CWD= $(shell pwd)
# CC
CC = g++
# LIBS
GLPKLIB = -lglpk
LIBS = -lpthread -lz ${GLPKLIB}
# INCS
MFATK_INC = -I${CWD}/include
ENV_INC = ${INC}
INCS = ${MFATK_INC} ${ENV_INC}
# FLAGS
OFLAGS = -DNDEBUG -DIL_STD -DILOSTRICTPOD -DNOSAFEMEM -DNOBLOCKMEM -O3
FFLAGS = -fPIC -fexceptions
# CCFLAGS
CCFLAGS = ${INCS} ${OFLAGS} ${FFLAGS}
LDFLAGS = ${GLPKLIB}
CPLEXAPI = CPLEXapiEMPTY.cpp
SRCDIR=${CWD}/src
SRCFILES = ${SRCDIR}/driver.cpp ${SRCDIR}/MFAProblem.cpp ${SRCDIR}/${CPLEXAPI} ${SRCDIR}/SCIPapi.cpp ${SRCDIR}/GLPKapi.cpp ${SRCDIR}/LINDOapiEMPTY.cpp ${SRCDIR}/SolverInterface.cpp ${SRCDIR}/Species.cpp ${SRCDIR}/Data.cpp ${SRCDIR}/InterfaceFunctions.cpp ${SRCDIR}/Identity.cpp ${SRCDIR}/Reaction.cpp ${SRCDIR}/GlobalFunctions.cpp ${SRCDIR}/AtomCPP.cpp ${SRCDIR}/UtilityFunctions.cpp ${SRCDIR}/AtomType.cpp ${SRCDIR}/Gene.cpp ${SRCDIR}/GeneInterval.cpp ${SRCDIR}/stringDB.cpp
OBJFILES = $(SRCFILES:.cpp=.o)
mfatoolkit: $(OBJFILES)
if [ ! -d bin ]; then mkdir bin; fi
${CC} ${CCFLAGS} -o bin/mfatoolkit $(^) ${LDFLAGS}
%.o: %.cpp
${CC} ${CCFLAGS} -c $<; mv *.o ${SRCDIR}
deploy-mfatoolkit:
if [ ! -d ${TARGET}/etc/MFAToolkit ]; then mkdir -p ${TARGET}/etc/MFAToolkit; fi
cp -r etc ${TARGET}
cp bin/mfatoolkit ${TARGET}/bin
if [ ${IN_KBASE} ]; then curl "http://bioseed.mcs.anl.gov/~devoid/scip" > ${TARGET}/bin/scip; chmod +x ${TARGET}/bin/scip; fi
deploy: mfatoolkit deploy-mfatoolkit
clean:
rm -f ${SRCDIR}/*.o bin/mfatoolkit