diff options
author | rupak19 | 2020-04-10 14:39:58 +0530 |
---|---|---|
committer | rupak19 | 2020-04-10 14:39:58 +0530 |
commit | d81f45d6e4783c4915382390f480442995710546 (patch) | |
tree | 83a3415e8b43761cd1cabf3402430e50a413ae5d | |
parent | f00676384365fdea0b739ed3107552aa79e49c4b (diff) | |
download | Scilab6-Test-Toolbox-d81f45d6e4783c4915382390f480442995710546.tar.gz Scilab6-Test-Toolbox-d81f45d6e4783c4915382390f480442995710546.tar.bz2 Scilab6-Test-Toolbox-d81f45d6e4783c4915382390f480442995710546.zip |
-rw-r--r-- | jar/scilab_en_US_help.jar | bin | 15496 -> 15496 bytes | |||
-rw-r--r-- | macros/add.bin | bin | 1983 -> 1983 bytes | |||
-rw-r--r-- | macros/multiply.bin | bin | 1785 -> 1785 bytes | |||
-rwxr-xr-x | sci_gateway/cpp/builder_gateway_cpp.sce | 2 | ||||
-rwxr-xr-x | sci_gateway/cpp/libtest_toolbox.so | bin | 16712 -> 16712 bytes | |||
-rwxr-xr-x | sci_gateway/cpp/sci_multiply.cpp | 4 | ||||
-rwxr-xr-x | src/Makefile | 8 | ||||
-rwxr-xr-x | src/add.h | 1 | ||||
-rwxr-xr-x | src/libmul.so (renamed from thirdparty/linux/lib/x64/libadd.so) | bin | 15640 -> 15640 bytes | |||
-rwxr-xr-x | src/main.c | 4 | ||||
-rwxr-xr-x | src/mul.c (renamed from src/add.c) | 4 | ||||
-rwxr-xr-x | src/mul.h | 1 | ||||
-rw-r--r-- | src/mul.o (renamed from src/add.o) | bin | 1400 -> 1400 bytes | |||
-rwxr-xr-x | src/run.sh | 8 | ||||
-rwxr-xr-x | src/testmul (renamed from src/testadd) | bin | 19344 -> 19344 bytes | |||
-rwxr-xr-x | thirdparty/linux/include/add.h | 1 | ||||
-rwxr-xr-x | thirdparty/linux/include/mul.h | 1 | ||||
-rwxr-xr-x | thirdparty/linux/lib/x64/libmul.so (renamed from src/libadd.so) | bin | 15640 -> 15640 bytes |
18 files changed, 17 insertions, 17 deletions
diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar Binary files differindex 3c9feee..4ab4a7d 100644 --- a/jar/scilab_en_US_help.jar +++ b/jar/scilab_en_US_help.jar diff --git a/macros/add.bin b/macros/add.bin Binary files differindex 23b5bbb..60b6406 100644 --- a/macros/add.bin +++ b/macros/add.bin diff --git a/macros/multiply.bin b/macros/multiply.bin Binary files differindex 20905f1..1f2876a 100644 --- a/macros/multiply.bin +++ b/macros/multiply.bin diff --git a/sci_gateway/cpp/builder_gateway_cpp.sce b/sci_gateway/cpp/builder_gateway_cpp.sce index 32d8db9..44c8410 100755 --- a/sci_gateway/cpp/builder_gateway_cpp.sce +++ b/sci_gateway/cpp/builder_gateway_cpp.sce @@ -56,7 +56,7 @@ else//LINUX C_Flags = ["-I"+inc_base_dir]; - Linker_Flag = ["-L" + lib_base_dir + " -ladd -Wl,-rpath="+lib_base_dir] + Linker_Flag = ["-L" + lib_base_dir + " -lmul -Wl,-rpath="+lib_base_dir] end diff --git a/sci_gateway/cpp/libtest_toolbox.so b/sci_gateway/cpp/libtest_toolbox.so Binary files differindex 582de0f..d92bb2b 100755 --- a/sci_gateway/cpp/libtest_toolbox.so +++ b/sci_gateway/cpp/libtest_toolbox.so diff --git a/sci_gateway/cpp/sci_multiply.cpp b/sci_gateway/cpp/sci_multiply.cpp index 4aece25..5447dc7 100755 --- a/sci_gateway/cpp/sci_multiply.cpp +++ b/sci_gateway/cpp/sci_multiply.cpp @@ -14,7 +14,7 @@ extern "C" #include<api_scilab.h> #include <stdio.h> #include "localization.h" -#include "add.h" +#include "mul.h" @@ -43,7 +43,7 @@ if (nout != 1) scilab_getDoubleArray(env, in[0], &in1); scilab_getDoubleArray(env, in[1], &in2); - add(ar, in1[0],in2[0]); + mul(ar, in1[0],in2[0]); out[0] = scilab_createDoubleMatrix2d(env, 1, 1, 0); scilab_getDoubleArray(env, out[0], &out1); diff --git a/src/Makefile b/src/Makefile index d4719ac..430a48d 100755 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,4 @@ -LIBNAME = add +LIBNAME = mul all: lib$(LIBNAME).so test$(LIBNAME) @@ -8,12 +8,12 @@ $(LIBNAME).o: $(LIBNAME).h $(LIBNAME).c lib$(LIBNAME).so: $(LIBNAME).o gcc -shared -o lib$(LIBNAME).so $(LIBNAME).o -test$(LIBNAME): lib$(LIBNAME).so main.c add.h +test$(LIBNAME): lib$(LIBNAME).so main.c mul.h gcc -Wall -L$(PWD) -Wl,-rpath=$(PWD) -o $@ main.c -l$(LIBNAME) -g install: - cp add.h ../thirdparty/linux/include/ - cp libadd.so ../thirdparty/linux/lib/x64/ + cp mul.h ../thirdparty/linux/include/ + cp libmul.so ../thirdparty/linux/lib/x64/ .PHONY: clean clean: diff --git a/src/add.h b/src/add.h deleted file mode 100755 index db62457..0000000 --- a/src/add.h +++ /dev/null @@ -1 +0,0 @@ -int add(double* answ, double num1, double num2); diff --git a/thirdparty/linux/lib/x64/libadd.so b/src/libmul.so Binary files differindex 003d417..ccaf3ba 100755 --- a/thirdparty/linux/lib/x64/libadd.so +++ b/src/libmul.so @@ -1,9 +1,9 @@ #include<stdio.h>
-#include "add.h"
+#include "mul.h"
int main(void)
{
double ar[1];
- add(ar, 2,5);
+ mul(ar, 2,5);
printf("Inside main %f \n", ar[0]);
return 0;
}
@@ -1,8 +1,8 @@ /*This c program multiplies two variable values*/
#include<stdio.h>
#include <stdlib.h>
-#include "add.h"
-int add(double* answ, double num1, double num2)
+#include "mul.h"
+int mul(double* answ, double num1, double num2)
{
answ[0] = num1*num2;
//printf("Inside add %f \n", answ[0]);
diff --git a/src/mul.h b/src/mul.h new file mode 100755 index 0000000..8c29db3 --- /dev/null +++ b/src/mul.h @@ -0,0 +1 @@ +int mul(double* answ, double num1, double num2); Binary files differ@@ -1,8 +1,8 @@ rm *.o *.so *.lib test -gcc -fPIC -c add.c -gcc -shared -o libadd.so add.o +gcc -fPIC -c mul.c +gcc -shared -o libadd.so mul.o gcc -L$(pwd) -Wl,-rpath=$(pwd) -o test main.c -ladd -g -cp add.h ../thirdparty/linux/include/ -cp libadd.so ../thirdparty/linux/lib/x64/ +cp mul.h ../thirdparty/linux/include/ +cp libmul.so ../thirdparty/linux/lib/x64/ diff --git a/src/testadd b/src/testmul Binary files differindex 8990420..af34920 100755 --- a/src/testadd +++ b/src/testmul diff --git a/thirdparty/linux/include/add.h b/thirdparty/linux/include/add.h deleted file mode 100755 index db62457..0000000 --- a/thirdparty/linux/include/add.h +++ /dev/null @@ -1 +0,0 @@ -int add(double* answ, double num1, double num2); diff --git a/thirdparty/linux/include/mul.h b/thirdparty/linux/include/mul.h new file mode 100755 index 0000000..8c29db3 --- /dev/null +++ b/thirdparty/linux/include/mul.h @@ -0,0 +1 @@ +int mul(double* answ, double num1, double num2); diff --git a/src/libadd.so b/thirdparty/linux/lib/x64/libmul.so Binary files differindex 003d417..ccaf3ba 100755 --- a/src/libadd.so +++ b/thirdparty/linux/lib/x64/libmul.so |