-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.win
executable file
·44 lines (32 loc) · 2.08 KB
/
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
35
36
37
38
39
40
41
42
43
44
##
## Makefile for compiling MATLAB interfaces of COPT on Windows
##
CC = cl
CFLAGS = /nologo /O2 /MT /WX /DNDEBUG /DMATLAB_MEX_FILE
C_INCS = -I. -I"$(MATLAB_HOME)\extern\include" -I"$(COPT_HOME)\include"
C_LIBS = /LIBPATH:"$(COPT_HOME)\lib" copt.lib /LIBPATH:"$(MATLAB_HOME)\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib
C_MEXS = copt_read copt_solve copt_write copt_computeiis copt_feasrelax copt_tune copt_defaultparams
all: $(C_MEXS)
copt_read: copt_read.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) copt_read.c coptmex.c /link /dll /out:copt_read.mexw64 $(C_LIBS) /export:mexFunction
@copy /Y copt_read.mexw64 ..\lib > nul
copt_solve: copt_solve.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) copt_solve.c coptmex.c /link /dll /out:copt_solve.mexw64 $(C_LIBS) /export:mexFunction
@copy /Y copt_solve.mexw64 ..\lib > nul
copt_write: copt_write.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) copt_write.c coptmex.c /link /dll /out:copt_write.mexw64 $(C_LIBS) /export:mexFunction
@copy /Y copt_write.mexw64 ..\lib > nul
copt_computeiis: copt_computeiis.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) copt_computeiis.c coptmex.c /link /dll /out:copt_computeiis.mexw64 $(C_LIBS) /export:mexFunction
@copy /Y copt_computeiis.mexw64 ..\lib > nul
copt_feasrelax: copt_feasrelax.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) copt_feasrelax.c coptmex.c /link /dll /out:copt_feasrelax.mexw64 $(C_LIBS) /export:mexFunction
@copy /Y copt_feasrelax.mexw64 ..\lib > nul
copt_tune: copt_tune.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) copt_tune.c coptmex.c /link /dll /out:copt_tune.mexw64 $(C_LIBS) /export:mexFunction
@copy /Y copt_tune.mexw64 ..\lib > nul
copt_defaultparams: copt_defaultparams.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) copt_defaultparams.c coptmex.c /link /dll /out:copt_defaultparams.mexw64 $(C_LIBS) /export:mexFunction
@copy /Y copt_defaultparams.mexw64 ..\lib > nul
clean:
@del /s /q *.mexw64 *.exp *.lib *.obj > nul