-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.win
More file actions
33 lines (22 loc) · 811 Bytes
/
Makefile.win
File metadata and controls
33 lines (22 loc) · 811 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 = cl.exe
CFLAGS = /W4 /nologo /O2 /EHsc /D "_CRT_SECURE_NO_DEPRECATE"
# Choose one instruction set to accelerate LIBMF
# 1. use SSE
CFLAGS = $(CFLAGS) /D "USESSE"
# 2. use AVX
#CFLAGS = $(CFLAGS) /D "USEAVX" /arch:AVX
# 3. no acceleration
#CFLAGS = $(CFLAGS)
CFLAGS = $(CFLAGS) /D "USEOMP" /openmp
TARGET = windows
all: $(TARGET)\mf-train.exe $(TARGET)\mf-predict.exe lib
$(TARGET)\mf-predict.exe: mf.h mf-predict.cpp mf.obj
$(CXX) $(CFLAGS) mf-predict.cpp mf.obj -Fe$(TARGET)\mf-predict.exe
$(TARGET)\mf-train.exe: mf.h mf-train.cpp mf.obj
$(CXX) $(CFLAGS) mf-train.cpp mf.obj -Fe$(TARGET)\mf-train.exe
mf.obj: mf.cpp mf.h
$(CXX) $(CFLAGS) -c mf.cpp
lib: mf.cpp mf.def mf.h
$(CXX) $(CFLAGS) -LD mf.cpp -Fe$(TARGET)\mf -link -DEF:mf.def
clean:
-erase /Q *.obj *.dll *.lib *.exe $(TARGET)\.