-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 769 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 769 Bytes
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
SRC=src
TPL=Thirdparty
PREFIX=.
BIN=$(PREFIX)/bin
# Override this to inject gcov flags "-coverage -O0"
# in travis CI script. E.g., $ make COVERAGE="-coverage -O0"
COVERAGE=-O3
CINC=-I$(SRC) -I$(TPL)/solvers
CFLAGS= -pipe -DASL_BUILD -fPIC -DPIC -Wall
LDFLAGS=-ldl
all: $(TPL)/solvers/amplsolver.a \
$(BIN)/gjh_asl_json
$(BIN)/gjh_asl_json: $(SRC)/gjh_asl_json.o \
$(SRC)/AmplInterface.o \
$(TPL)/solvers/amplsolver.a
@mkdir -p $(BIN)
$(CXX) $(COVERAGE) $(CFLAGS) $(CINC) $^ $(LDFLAGS) -o $@
%.o : %.cpp $(SRC)/AmplInterface.hpp
$(CXX) $(COVERAGE) $(CFLAGS) $(CINC) -c $< -o $@
$(TPL)/solvers/amplsolver.a :
make -C $(TPL)/solvers/;
clean:
rm -f $(BIN)/gjh_asl_json;
rm -f $(SRC)/*.o
rm -f $(SRC)/*~
make clean -C $(TPL)/solvers;