diff options
author | ukashanoor | 2017-06-21 12:15:47 +0530 |
---|---|---|
committer | ukashanoor | 2017-06-21 12:15:47 +0530 |
commit | 18f7cf96174799b674115e43f108423fa5d0fc9c (patch) | |
tree | ab0d0ac7a349986cf95556b7c1975748cbfb8ec1 /macros/CCodeGeneration | |
parent | 785e19f097f7ca1964edaf159c9adfe2eda733b5 (diff) | |
parent | e92d6c6791aae06053637ad3bf6b0f9d8986986c (diff) | |
download | Scilab2C_fossee_old-18f7cf96174799b674115e43f108423fa5d0fc9c.tar.gz Scilab2C_fossee_old-18f7cf96174799b674115e43f108423fa5d0fc9c.tar.bz2 Scilab2C_fossee_old-18f7cf96174799b674115e43f108423fa5d0fc9c.zip |
updated with main repo
Diffstat (limited to 'macros/CCodeGeneration')
-rw-r--r-- | macros/CCodeGeneration/C_GenerateMakefile.sci | 19 | ||||
-rw-r--r-- | macros/CCodeGeneration/C_GenerateMkfle_arduino.sci | 12 | ||||
-rw-r--r-- | macros/CCodeGeneration/names | 1 |
3 files changed, 32 insertions, 0 deletions
diff --git a/macros/CCodeGeneration/C_GenerateMakefile.sci b/macros/CCodeGeneration/C_GenerateMakefile.sci index 7dfb4da..893ec93 100644 --- a/macros/CCodeGeneration/C_GenerateMakefile.sci +++ b/macros/CCodeGeneration/C_GenerateMakefile.sci @@ -78,6 +78,25 @@ else PrintStringInfo('CXXFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y'); PrintStringInfo('LDFLAGS = -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y'); end + + //If ode function is used, add libgsl. + if(size(SharedInfo.Includelist) <> 0) + if((mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T)) + if(target == 'RPi') + PrintStringInfo('LDFLAGS = -lgsl -lcblas',FileInfo.MakefileFilename,'file','y','y'); + else + PrintStringInfo('LDFLAGS = -lgsl',FileInfo.MakefileFilename,'file','y','y'); + end + + end + end + + if (target == 'RPi') + PrintStringInfo('LDFLAGS += -llapack -lrefblas -lgfortran -lwiringPi',FileInfo.MakefileFilename,'file','y','y'); + else + PrintStringInfo('LDFLAGS += -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y'); + end + if(SharedInfo.OpenCVUsed == %T) PrintStringInfo('LDFLAGS += -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_gpu',FileInfo.MakefileFilename,'file','y','y'); PrintStringInfo('LDFLAGS += -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree',FileInfo.MakefileFilename,'file','y','y'); diff --git a/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci b/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci new file mode 100644 index 0000000..b43eb44 --- /dev/null +++ b/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci @@ -0,0 +1,12 @@ +function C_GenerateMkfle_arduino(FileInfo,SharedInfo) + + PrintStringInfo('ARDUINO_DIR = /usr/share/arduino',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('ARDMK_DIR = /usr/share/arduino',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('AVR_TOOLS_DIR = /usr',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('BOARD_TAG = ' + SharedInfo.Board_name ,FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('USER_LIB_PATH = ../',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('ARDUINO_LIBS = ../src/c ../includes ../interfaces ../ Wire',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('ARDUINO_PORT = /dev/ttyACM0',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('include /usr/share/arduino/Arduino.mk',FileInfo.MakefileFilename,'file','y','y'); + +endfunction diff --git a/macros/CCodeGeneration/names b/macros/CCodeGeneration/names index c4dea61..4d76299 100644 --- a/macros/CCodeGeneration/names +++ b/macros/CCodeGeneration/names @@ -6,6 +6,7 @@ C_GenerateFunName C_GenerateLaunchScript C_GenerateMakefile C_GenerateMakefile_msvc +C_GenerateMkfle_arduino C_GenerateSCI2CHeader C_IfElseBlocks C_IfExpression |