forked from fay85/IS-ASGD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (49 loc) · 2 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
# C++ Compiler and options
CPP=g++ -Wall -O3 -std=c++11 -fopenmp -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings
# Path to hogwild (e.g. hogwildtl/include)
HOG_INCL=hogwildtl/include
# Path to Hazy Template Library (e.g. hazytl/include)
HTL_INCL=hazytl/include
# Conversion tools
#TOOLS=bin/convert_matlab bin/convert bin/unconvert
UNAME=$(shell uname)
ifneq ($(UNAME), Darwin)
LIB_RT=-lrt -lboost_system -lpthread
endif
#ALL= $(TOOLS) obj/frontend.o bin/svm bin/tracenorm bin/multicut \
bin/bbtracenorm bin/predict bin/bbsvm bin/bbmulticut
ALL= $(TOOLS) obj/frontend.o bin/svm
all: $(ALL)
obj/frontend.o:
$(CPP) -c src/frontend_util.cc -o obj/frontend.o
bin/svm: obj/frontend.o
$(CPP) -o bin/svm src/svm_main.cc -I$(HOG_INCL) -I$(HTL_INCL) -lpthread $(LIB_RT) \
obj/frontend.o
ifeq (0,1)
bin/bbsvm: obj/frontend.o
$(CPP) -o bin/bbsvm src/bbsvm_main.cc -I$(HOG_INCL) -I$(HTL_INCL) -lpthread $(LIB_RT) \
obj/frontend.o
bin/tracenorm: obj/frontend.o
$(CPP) -o bin/tracenorm src/tracenorm.cc -I$(HOG_INCL) -I$(HTL_INCL) -lpthread $(LIB_RT) \
obj/frontend.o
bin/predict:
$(CPP) -o bin/predict src/tracenorm/predict.cc -I$(HOG_INCL) -I$(HTL_INCL) -lpthread $(LIB_RT) \
obj/frontend.o
bin/bbtracenorm: obj/frontend.o
$(CPP) -o bin/bbtracenorm src/bbtracenorm.cc -I$(HOG_INCL) -I$(HTL_INCL) -lpthread $(LIB_RT) \
obj/frontend.o
bin/multicut: obj/frontend.o
$(CPP) -o bin/multicut src/multicut.cc -I$(HOG_INCL) -I$(HTL_INCL) -lpthread $(LIB_RT) \
obj/frontend.o
bin/bbmulticut: obj/frontend.o
$(CPP) -o bin/bbmulticut src/bbmulticut.cc -I$(HOG_INCL) -I$(HTL_INCL) -lpthread $(LIB_RT) \
obj/frontend.o
bin/convert: src/tools/tobinary.cc
$(CPP) -o bin/convert src/tools/tobinary.cc -I$(HOG_INCL) -I$(HTL_INCL)
bin/convert_matlab: src/tools/tobinary.cc
$(CPP) -o bin/convert_matlab src/tools/tobinary.cc -I$(HOG_INCL) -I$(HTL_INCL) -DMATLAB_CONVERT_OFFSET=1
bin/unconvert: src/tools/unconvert.cc
$(CPP) -o bin/unconvert src/tools/unconvert.cc -I$(HOG_INCL) -I$(HTL_INCL)
endif
clean:
rm -f $(ALL)