-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
45 lines (35 loc) · 1.25 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
CC=gcc
CPP=g++
CFLAGS+= -m64 -g -Wall -std=c++14
LDFLAGS= -L$$GUROBI_HOME/lib -lgurobi91
LIBS=
INC= $$GUROBI_HOME/include/
ALLDEP:= $(patsubst %.h,%.o,$(wildcard *.h)) $(wildcard *.hpp) $(wildcard *.tpp)
ALLILP:= $(wildcard *_ILP.c)
.PHONY: all
all: $(patsubst %.cpp,%.out,$(filter-out genSubseqSeedsGraph.cpp, $(filter-out $(patsubst %.h,%.cpp,$(wildcard *.h)), $(wildcard *.cpp))))
.PHONY: product
product: CFLAGS = -O3 -std=c++14
product: $(ALLDEP) $(patsubst %.cpp,%.out,$(filter-out genSubseqSeedsGraph.cpp, $(filter-out $(patsubst %.o,%.cpp,$(ALLDEP)) $(ALLILP), $(wildcard *.cpp))))
sampleFast%.out: sampleFast%.cpp
$(CPP) $(CFLAGS) -std=c++17 -o $@ $^ $(LIBS)
genSubseqSeed%.out: genSubseqSeed%.cpp $(ALLDEP)
$(CPP) $(CFLAGS) -o $@ $(filter %.o %.cpp, $^) $(LIBS) -pthread
%.out: %.cpp $(ALLDEP)
$(CPP) $(CFLAGS) -o $@ $(filter %.o %.cpp, $^) $(LIBS)
%.out: %.c $(ALLDEP)
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
%.o: %.cpp %.h makefile
$(CPP) $(CFLAGS) -MMD -c $< -o $@
%.o: %.c %.h makefile
$(CC) $(CFLAGS) -MMD -c $< -o $@
#gurobi make
%_ILP: %_ILP.c $(ALLDEP)
$(CC) $(CFLAGS) -o $@ $^ -I$(INC) $(LDFLAGS) -lm
.PHONY: clean
clean:
rm -rf *.out *.o *.dSYM *.d
.PHONY: realclean clean-backups
realclean: clean clean-backups
clean-backups:
rm -rf *~ #*#