]> granicus.if.org Git - liblinear/blob - Makefile.win
Cross compilation fix
[liblinear] / Makefile.win
1 CXX = cl.exe
2 CFLAGS = /nologo /O2 /EHsc /I. /D _WIN64 /D _CRT_SECURE_NO_DEPRECATE
3 TARGET = windows
4
5 all: $(TARGET)\train.exe $(TARGET)\predict.exe lib
6
7 $(TARGET)\train.exe: newton.obj linear.obj train.c blas\*.c
8         $(CXX) $(CFLAGS) -Fe$(TARGET)\train.exe newton.obj linear.obj train.c blas\*.c
9
10 $(TARGET)\predict.exe: newton.obj linear.obj predict.c blas\*.c
11         $(CXX) $(CFLAGS) -Fe$(TARGET)\predict.exe newton.obj linear.obj predict.c blas\*.c
12
13 linear.obj: linear.cpp linear.h
14         $(CXX) $(CFLAGS) -c linear.cpp
15
16 newton.obj: newton.cpp newton.h
17         $(CXX) $(CFLAGS) -c newton.cpp
18
19 lib: linear.cpp linear.h linear.def newton.obj
20         $(CXX) $(CFLAGS) -LD linear.cpp newton.obj blas\*.c -Fe$(TARGET)\liblinear -link -DEF:linear.def
21
22 clean:
23          -erase /Q *.obj $(TARGET)\*.exe $(TARGET)\*.dll $(TARGET)\*.exp $(TARGET)\*.lib
24