-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
29 lines (23 loc) · 885 Bytes
/
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
CXX = g++
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXX = g++-6
endif
#MKLPATH = /home/skypole/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64_lin
#MKLINCLUDE = /home/skypole/intel/compilers_and_libraries_2018.2.199/linux/mkl/include
MKLROOT = /home/skypole/intel/compilers_and_libraries_2018.2.199/linux/mkl
CXXFLAGS = -Wall -O3 -std=c++0x -march=native
MKLFLAGS = -m64 -I${MKLROOT}/include -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -lm -ldl
# comment the following flags if you do not want to use OpenMP
DFLAG += -DUSEOMP
CXXFLAGS += -fopenmp
#CXXAGS += $(MKLFLAGS)
all: train predict
predict: predict.cpp mf.o
$(CXX) $(CXXFLAGS) -o $@ $^
train: train.cpp mf.o
$(CXX) $(CXXFLAGS) -o $@ $^
ffm.o: mf.cpp mf.h
$(CXX) $(CXXFLAGS) $(DFLAG) -c -o $@ $<
clean:
rm -f train predict mf.o *.bin.*