From 633deb856914bd374d62b3fb3b63447bd81bc03c Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Tue, 20 Jun 2017 15:26:40 +0530 Subject: Bug fixed for GSL library --- 2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to '2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci') diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci index 7dfb4da4..893ec938 100644 --- a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci +++ b/2.3-1/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'); -- cgit