-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
81 lines (54 loc) · 2.27 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#------------------------------------------------------------
#
# When you adapt this makefile to compile your CPLEX programs
# please copy this makefile and set CPLEXDIR and CONCERTDIR to
# the directories where CPLEX and CONCERT are installed.
#
#------------------------------------------------------------
ILOGSTUDIODIR = /home/alessio/CPLEX
CPLEXDIR = $(ILOGSTUDIODIR)/cplex
CONCERTDIR = $(ILOGSTUDIODIR)/concert
# ---------------------------------------------------------------------
# Compiler selection
# ---------------------------------------------------------------------
CCC = g++ -O0
# ---------------------------------------------------------------------
# Link options and libraries
# ---------------------------------------------------------------------
CPLEXBINDIR = $(CPLEXDIR)/bin/$(BINDIST)
CPLEXLIBDIR = $(CPLEXDIR)/lib/x86-64_sles10_4.1/static_pic
CONCERTLIBDIR = $(CONCERTDIR)/lib/x86-64_sles10_4.1/static_pic
CCLNFLAGS = -L$(CPLEXLIBDIR) -lilocplex -lcplex -L$(CONCERTLIBDIR) -lconcert -lm -pthread
all:
make -f Makefile all_cpp
execute: all
make -f Makefile execute_cpp
CONCERTINCDIR = $(CONCERTDIR)/include
CPLEXINCDIR = $(CPLEXDIR)/include
EXDIR = $(pwd)
EXINC = $(EXDIR) #/include
EXDATA = $(EXDIR) #/data
EXSRCCPP = $(EXDIR) #/src/cpp
CCFLAGS = -g2 $(CCOPT) -I$(CPLEXINCDIR) -I$(CONCERTINCDIR)
#------------------------------------------------------------
# make all : to compile the examples.
# make execute : to compile and execute the examples.
#------------------------------------------------------------
CPP_EX = clean gwlan_ex inst_mak
all_cpp: $(CPP_EX)
execute_cpp: $(CPP_EX)
./gwlan_ex
# ------------------------------------------------------------
clean :
rm -rf *.o *~ *.class
rm -rf $(CPP_EX)
rm -rf *.mps *.ord *.sos *.lp *.sav *.net *.msg *.log *.clp
# ------------------------------------------------------------
gwlan_ex: algo_main.o gwlan_lib.o
$(CCC) $(CCFLAGS) algo_main.o gwlan_lib.o -o gwlan_ex $(CCLNFLAGS)
algo_main.o: $(EXSRCCPP)algo_main.cc
$(CCC) -c $(CCFLAGS) $(EXSRCCPP)algo_main.cc
gwlan_lib.o: $(EXSRCCPP)gwlan_lib.cc
g++ -std=c++11 -c $(CCFLAGS) $(EXSRCCPP)gwlan_lib.cc
inst_mak: instance-maker.cc
g++ -std=c++0x -o inst-maker -I. ConfigFile.cpp instance-maker.cc