-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.osx
executable file
·44 lines (32 loc) · 2.1 KB
/
Makefile.osx
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 MacOS
##
CC = clang
CFLAGS = -O2 -std=c99 -fPIC -Werror -DNDEBUG -DMATLAB_MEX_FILE
C_INCS = -I. -I$(MATLAB_HOME)/extern/include -I$(COPT_HOME)/include
C_LIBS = -L$(COPT_HOME)/lib -lcopt -L$(MATLAB_HOME)/bin/maci64 -lmx -lmex -lmat
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 -install_name @rpath/copt_read.mexmaci64 -o copt_read.mexmaci64 copt_read.c coptmex.c $(C_LIBS)
@cp copt_read.mexmaci64 ../lib
copt_solve: copt_solve.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -install_name @rpath/copt_solve.mexmaci64 -o copt_solve.mexmaci64 copt_solve.c coptmex.c $(C_LIBS)
@cp copt_solve.mexmaci64 ../lib
copt_write: copt_write.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -install_name @rpath/copt_write.mexmaci64 -o copt_write.mexmaci64 copt_write.c coptmex.c $(C_LIBS)
@cp copt_write.mexmaci64 ../lib
copt_computeiis: copt_computeiis.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -install_name @rpath/copt_computeiis.mexmaci64 -o copt_computeiis.mexmaci64 copt_computeiis.c coptmex.c $(C_LIBS)
@cp copt_computeiis.mexmaci64 ../lib
copt_feasrelax: copt_feasrelax.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -install_name @rpath/copt_feasrelax.mexmaci64 -o copt_feasrelax.mexmaci64 copt_feasrelax.c coptmex.c $(C_LIBS)
@cp copt_feasrelax.mexmaci64 ../lib
copt_tune: copt_tune.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -install_name @rpath/copt_tune.mexmaci64 -o copt_tune.mexmaci64 copt_tune.c coptmex.c $(C_LIBS)
@cp copt_tune.mexmaci64 ../lib
copt_defaultparams: copt_defaultparams.c coptmex.c coptmex.h coptinit.c
@$(CC) $(CFLAGS) $(C_INCS) -shared -install_name @rpath/copt_defaultparams.mexmaci64 -o copt_defaultparams.mexmaci64 copt_defaultparams.c coptmex.c $(C_LIBS)
@cp copt_defaultparams.mexmaci64 ../lib
clean:
@rm -f *.mexmaci64