diff options
Diffstat (limited to 'macros/CCodeGeneration')
-rw-r--r-- | macros/CCodeGeneration/C_GenerateMakefile.bin | bin | 28780 -> 30200 bytes | |||
-rw-r--r-- | macros/CCodeGeneration/C_GenerateMakefile.sci | 26 | ||||
-rw-r--r-- | macros/CCodeGeneration/C_Type.bin | bin | 5564 -> 5740 bytes | |||
-rw-r--r-- | macros/CCodeGeneration/C_Type.sci | 2 |
4 files changed, 17 insertions, 11 deletions
diff --git a/macros/CCodeGeneration/C_GenerateMakefile.bin b/macros/CCodeGeneration/C_GenerateMakefile.bin Binary files differindex 5a095f4..efa5cd6 100644 --- a/macros/CCodeGeneration/C_GenerateMakefile.bin +++ b/macros/CCodeGeneration/C_GenerateMakefile.bin diff --git a/macros/CCodeGeneration/C_GenerateMakefile.sci b/macros/CCodeGeneration/C_GenerateMakefile.sci index 29e8a08..a915616 100644 --- a/macros/CCodeGeneration/C_GenerateMakefile.sci +++ b/macros/CCodeGeneration/C_GenerateMakefile.sci @@ -65,15 +65,14 @@ if getos() == 'Windows' then else if (target == 'RPi') PrintStringInfo('CC = arm-linux-gnueabihf-gcc ',FileInfo.MakefileFilename,'file','y','y'); - else + PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('LDFLAGS = -llapack -lrefblas -lgfortran -lm -lwiringPi',FileInfo.MakefileFilename,'file','y','y'); + else PrintStringInfo('CC = gcc',FileInfo.MakefileFilename,'file','y','y'); - end - PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y'); - if (target == 'RPi') - PrintStringInfo('LDFLAGS = -llapack -lrefblas -lgfortran -lm -lwiringPi',FileInfo.MakefileFilename,'file','y','y'); - else - PrintStringInfo('LDFLAGS = -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y'); - end + PrintStringInfo('CFLAGS = -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 + end //If ode function is used, add libgsl. if(size(SharedInfo.Includelist) <> 0) @@ -82,21 +81,26 @@ if(size(SharedInfo.Includelist) <> 0) end end +if(SharedInfo.OpenCVUsed == %T) + PrintStringInfo('LDFLAGS += `pkg-config --libs opencv`',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CFLAGS += `pkg-config --cflags opencv`',FileInfo.MakefileFilename,'file','y','y'); +end + // Binary definition -PrintStringInfo('EXEFILENAME = mytest.exe',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('EXEFILENAME = '+SharedInfo.SCIMainFunName,FileInfo.MakefileFilename,'file','y','y'); PrintStringInfo('EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)', FileInfo.MakefileFilename,'file','y','y'); // Sources //Check the output format selected and insert files according to it target = SharedInfo.Target; PrintStringInfo('SRC = \\', FileInfo.MakefileFilename,'file','y','y'); -allSources = getAllSources(target); +allSources = getAllSources(SharedInfo); nbSources = size(allSources); for i = 1:(nbSources(1) - 1) [tmppath,tmpfile,tmpext] = fileparts(allSources(i)); - if(~isempty(strstr(allSources(i),'ode'))) + if(~isempty(strstr(allSources(i),'dode'))) if(size(SharedInfo.Includelist) <> 0) if((mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T)) PrintStringInfo(' $(CSRCDIR)/'+tmpfile+tmpext+' \\', FileInfo.MakefileFilename,'file','y','y'); diff --git a/macros/CCodeGeneration/C_Type.bin b/macros/CCodeGeneration/C_Type.bin Binary files differindex f9bad33..78311b6 100644 --- a/macros/CCodeGeneration/C_Type.bin +++ b/macros/CCodeGeneration/C_Type.bin diff --git a/macros/CCodeGeneration/C_Type.sci b/macros/CCodeGeneration/C_Type.sci index 3c56b71..60a3f8b 100644 --- a/macros/CCodeGeneration/C_Type.sci +++ b/macros/CCodeGeneration/C_Type.sci @@ -50,6 +50,8 @@ elseif (ArgType == 'i32') elseif (ArgType == 'fn') //This type introduced for ODE function, // as it's one of the inout argument is name of the other function OutC_Type = ''; +elseif (ArgType == 'im') + OutC_Type = 'IplImage*' else error(9999, 'Unknown Argument Type: ""'+ArgType+'"".'); end |