-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen-so.sh
More file actions
executable file
·28 lines (21 loc) · 777 Bytes
/
gen-so.sh
File metadata and controls
executable file
·28 lines (21 loc) · 777 Bytes
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
#!/bin/bash
rm -f *.out *.so *.o *.oct
if [[ -z "$*" ]];
then
echo 'Warning: Correct usage ./gen-so.sh <filename>'
set -- "fun"
fi
#The $1 is the filename that can be passed as an argument to this file. Default is 'fun'
mkoctfile -loctave -loctinterp -fPIC $1.cpp
g++ -loctave -loctinterp -shared -o lib$1.so $1.o
#sudo cp libfun.so /usr/lib
#sudo /sbin/ldconfig
g++ -Wall -L$(pwd) -Wl,-rpath=$(pwd) -o test main.cpp -l$1 -g
#mkoctfile -fPIC --link-stand-alone $1.cpp -o $1.out
#gcc $1.o -shared -o lib$1.so
#sudo cp libfun.so /usr/lib
#sudo /sbin/ldconfig
#g++ -shared -o lib$1.so $1.o
#g++ -L$(pwd) -Wl,-rpath=$(pwd) -Wall -o oct main.cpp -l$1
cp fun.h ../temp-scilab_octave/thirdparty/linux/include/
cp libfun.so ../temp-scilab_octave/thirdparty/linux/lib/x64/