-
Notifications
You must be signed in to change notification settings - Fork 80
/
Makefile.win
36 lines (25 loc) · 930 Bytes
/
Makefile.win
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
CXX = cl.exe
CFLAGS = /W4 /nologo /O2 /EHsc /D "_CRT_SECURE_NO_DEPRECATE"
# Choose one instruction set to accelerate LIBMF
# 1. use SSE
CPUSET = /D "USESSE"
# 2. use AVX
#CPUSET = /D "USEAVX" /arch:AVX
# 3. no acceleration
#CPUSET =
# Always use OpenMP because Visual Studio supports it.
CFLAGS = $(CFLAGS) $(CPUSET) /D "USEOMP" /openmp
# To disable OpenMP, please use the command below.
#CFLAGS = $(CFLAGS) $(CPUSET) /D
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)\.