-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (31 loc) · 1.3 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
GUROBI_HOME =/opt/gurobi/9.0.1/linux64
# ---------------------------------------------------------------------
# Compiler selection
# ---------------------------------------------------------------------
GPP = /usr/bin/g++
# ---------------------------------------------------------------------
# Compiler options
# ---------------------------------------------------------------------
OPT = -m64 -O3 -std=c++0x -Wextra -pedantic
# ---------------------------------------------------------------------
# Link options and libraries
# ---------------------------------------------------------------------
CFLAGS=-Wall
INSTANCE = ./
INC = $(GUROBI_HOME)/include
OPT_INC = $(OPT) -I$(INC)
LIBDIR = $(GUROBI_HOME)/lib/
LIB = -L$(LIBDIR) -lgurobi_g++4.2 -lgurobi_c++ -lgurobi90 -lm -lpthread
SOURCES= main.cpp functions.cpp classes.cpp
HEADERS= functions.h classes.h
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=main
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(GPP) $(OPT_INC) $(OBJECTS) -o $@ $(LIB)
%.o: %.cpp $(HEADERS)
$(GPP) $(CFLAGS) $(OPT_INC) -c $< -o $@
clean :
/bin/rm -rf *.o *_c *_c++ *.class *.log *.rlp *.lp *.bas *.ilp
/bin/rm -rf *~ *.mps *.ord *.sos *.sav *.net *.msg *.clp
# ------------------------------------------------------------