-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
executable file
·68 lines (50 loc) · 2.87 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
# Makefile for SVM-perf, 31.10.05
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
MATLABROOT ?= /Applications/MATLAB_R2015a.app
endif
ifeq ($(UNAME), Linux)
MATLABROOT ?= /usr/local/MATLAB/R2014b/
endif
MEX = $(MATLABROOT)/bin/mex
#Use the following to compile under unix or cygwin
CC = gcc
LD = gcc
#Call 'make' using the following line to make CYGWIN produce stand-alone Windows executables
# make 'SFLAGS=-mno-cygwin'
CFLAGS = $(SFLAGS) -O3 -fomit-frame-pointer -ffast-math -Wall
LDFLAGS = $(SFLAGS) -O3 -lm -Wall
#CFLAGS = $(SFLAGS) -pg -Wall
#LDFLAGS = $(SFLAGS) -pg -Wall
LIBS=-L. -lm # used libraries
all: svm_rank_learn svm_rank_classify
.PHONY: clean
clean: svm_light_clean svm_struct_clean
rm -f *.o *.tcov *.d core gmon.out *.stackdump
#-----------------------#
#---- SVM-light ----#
#-----------------------#
svm_light_hideo_noexe:
cd svm_light; make svm_learn_hideo_noexe
svm_light_clean:
cd svm_light; make clean
#----------------------#
#---- STRUCT SVM ----#
#----------------------#
svm_struct_noexe:
cd svm_struct; make svm_struct_noexe
svm_struct_clean:
cd svm_struct; make clean
#---------------------#
#---- SVM rank ----#
#---------------------#
svm_rank_classify: svm_light_hideo_noexe svm_struct_noexe svm_struct_api.o svm_struct/svm_struct_classify.o svm_struct/svm_struct_common.o svm_struct/svm_struct_main.o
$(MEX) -largeArrayDims svm_struct_api.o svm_struct/svm_struct_classify.o svm_light/svm_common.o svm_struct/svm_struct_common.o -output svm_rank_classify
#$(LD) $(LDFLAGS) svm_struct_api.o svm_struct/svm_struct_classify.o svm_light/svm_common.o svm_struct/svm_struct_common.o -o svm_rank_classify $(LIBS)
svm_rank_learn: svm_light_hideo_noexe svm_struct_noexe svm_struct_api.o svm_struct_learn_custom.o svm_struct/svm_struct_learn.o svm_struct/svm_struct_common.o svm_struct/svm_struct_main.o
#$(LD) $(LDFLAGS) svm_struct/svm_struct_learn.o svm_struct_learn_custom.o svm_struct_api.o svm_light/svm_hideo.o svm_light/svm_learn.o svm_light/svm_common.o svm_struct/svm_struct_common.o svm_struct/svm_struct_main.o -o svm_rank_learn $(LIBS)
$(MEX) -largeArrayDims svm_struct/svm_struct_learn.o svm_struct_learn_custom.o svm_struct_api.o svm_light/svm_hideo.o svm_light/svm_learn.o svm_light/svm_common.o svm_struct/svm_struct_common.o svm_struct/svm_struct_main.o -output svm_rank_learn
svm_struct_api.o: svm_struct_api.c svm_struct_api.h svm_struct_api_types.h svm_light/svm_common.h svm_struct/svm_struct_common.h
$(MEX) -largeArrayDims -O CFLAGS='-std=c99 -fPIC' -c svm_struct_api.c svm_struct_api.o
svm_struct_learn_custom.o: svm_struct_learn_custom.c svm_struct_api.h svm_light/svm_common.h svm_struct_api_types.h svm_struct/svm_struct_common.h
$(MEX) -largeArrayDims -O CFLAGS='-std=c99 -fPIC' -c svm_struct_learn_custom.c svm_struct_learn_custom.o