summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorrupak2019-11-13 15:00:02 +0530
committerrupak2019-11-13 15:00:02 +0530
commite714c776ac9f5637d1dc4f9eb23c242f83a4e2f9 (patch)
tree93768fb8dc121a09dcfb288cbaeaf81bb9b7e224 /src/Makefile
parentd525b352aa098234d99782d742cfd012d74e89da (diff)
downloadfossee-scilab-octave-toolbox-e714c776ac9f5637d1dc4f9eb23c242f83a4e2f9.tar.gz
fossee-scilab-octave-toolbox-e714c776ac9f5637d1dc4f9eb23c242f83a4e2f9.tar.bz2
fossee-scilab-octave-toolbox-e714c776ac9f5637d1dc4f9eb23c242f83a4e2f9.zip
added src folder for cpp source
Diffstat (limited to 'src/Makefile')
-rwxr-xr-xsrc/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100755
index 0000000..ad535f0
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,20 @@
+LIBNAME = fun
+
+all: lib$(LIBNAME).so test$(LIBNAME)
+
+$(LIBNAME).o: $(LIBNAME).h $(LIBNAME).cpp
+ mkoctfile -c -fPIC $(LIBNAME).cpp
+
+lib$(LIBNAME).so: $(LIBNAME).o
+ g++ -loctave -loctinterp -shared -o lib$(LIBNAME).so $(LIBNAME).o
+
+test$(LIBNAME): lib$(LIBNAME).so main.cpp fun.h
+ g++ -Wall -L$(PWD) -Wl,-rpath=$(PWD) -o $@ main.cpp -l$(LIBNAME) -g -loctave -loctinterp
+
+install:
+ cp fun.h ../thirdparty/linux/include/
+ cp libfun.so ../thirdparty/linux/lib/x64/
+
+.PHONY: clean
+clean:
+ $(RM) -f *.out *.so *.o *.oct