forked from turi-code/python-libffm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 651 Bytes
/
Makefile
File metadata and controls
31 lines (21 loc) · 651 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
CXX := g++
CXXFLAGS := -O3 -std=c++11 -I ../sdk -shared -fPIC -march=native
DFLAG += -DUSEOMP
CXXFLAGS += -fopenmp
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXXFLAGS += --stdlib=libc++ -undefined dynamic_lookup
endif
libffm : libffm.so
libffm.so: src/libffm.cpp lib/ffm.o
$(CXX) -o libffm.so $(CXXFLAGS) src/libffm.cpp lib/ffm.o
ffm-train: lib/ffm-train.cpp lib/ffm.o
$(CXX) $(CXXFLAGS) -o $@ $^
ffm-predict: lib/ffm-predict.cpp lib/ffm.o
$(CXX) $(CXXFLAGS) -o $@ $^
lib/ffm.o: lib/ffm.cpp lib/ffm.h
$(CXX) $(CXXFLAGS) $(DFLAG) -c -o $@ $<
clean:
rm *.so
#### All targets ####
all: libffm ffm-train ffm-predict lib/ffm.o