forked from jegonzal/PowerGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmex_link.sh
More file actions
executable file
·21 lines (15 loc) · 791 Bytes
/
Copy pathmex_link.sh
File metadata and controls
executable file
·21 lines (15 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
OUTPUT=$1
STATIC_LIB_NAME=$OUTPUT
MOVE_LOCATION=$2
BASEDIR=$3
LINKFILES=$4
LINKER_FLAGS= -shared -Wl,--version-script,/afs/cs.cmu.edu/misc/matlab/amd64_f7/7.9/lib/matlab7/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
echo $OUTPUT
echo $STATIC_LIB_NAME
echo 'Running godawful mex linking hack...'
# mex_stub.o compiled with:
g++ -g -Wall -fPIC -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread -DMATLAB_MEX_FILE -lmx -lmex -lmat -lm -I/afs/cs.cmu.edu/local/matlab/amd64_f7/7.9/lib/matlab7/extern/include -c ${BASEDIR}/cmake/Mex_stub.cpp -o mex_stub.o
mex -g -cxx CC='gcc' CXX='g++' LD='g++' -L./ -lglib-2.0 -l$STATIC_LIB_NAME $LINKER_FLAGS -output $OUTPUT mex_stub.o $LINKFILES
#mv $OUTPUT.mexa64 $MOVE_LOCATION
#-lpthread -lgthread-2.0 -lrt -DMX_COMPAT_32