-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.unix
executable file
·44 lines (32 loc) · 1.79 KB
/
Makefile.unix
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 Linux
##
CC = gcc
CFLAGS = -O2 -std=c99 -fPIC -Werror -DNDEBUG -DMATLAB_MEX_FILE -Wno-incompatible-pointer-types
C_INCS = -I. -I$(MATLAB_HOME)/extern/include -I$(COPT_HOME)/include
C_LIBS = -L$(COPT_HOME)/lib -lcopt -L$(MATLAB_HOME)/bin/glnxa64 -lmx -lmex -lmat -lm -ldl
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) -shared -o copt_read.mexa64 copt_read.c coptmex.c $(C_LIBS)
@cp copt_read.mexa64 ../lib
copt_solve: copt_solve.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -o copt_solve.mexa64 copt_solve.c coptmex.c $(C_LIBS)
@cp copt_solve.mexa64 ../lib
copt_write: copt_write.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -o copt_write.mexa64 copt_write.c coptmex.c $(C_LIBS)
@cp copt_write.mexa64 ../lib
copt_computeiis: copt_computeiis.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -o copt_computeiis.mexa64 copt_computeiis.c coptmex.c $(C_LIBS)
@cp copt_computeiis.mexa64 ../lib
copt_feasrelax: copt_feasrelax.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -o copt_feasrelax.mexa64 copt_feasrelax.c coptmex.c $(C_LIBS)
@cp copt_feasrelax.mexa64 ../lib
copt_tune: copt_tune.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -o copt_tune.mexa64 copt_tune.c coptmex.c $(C_LIBS)
@cp copt_tune.mexa64 ../lib
copt_defaultparams: copt_defaultparams.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -o copt_defaultparams.mexa64 copt_defaultparams.c coptmex.c $(C_LIBS)
@cp copt_defaultparams.mexa64 ../lib
clean:
@rm -f *.mexa64