diff options
author | siddhu8990 | 2016-12-20 13:29:53 +0530 |
---|---|---|
committer | siddhu8990 | 2016-12-20 13:29:53 +0530 |
commit | 28d16508c39756d1f143b44c33115530fd4a7653 (patch) | |
tree | 3cc2ae342605c573cbc57430122481b8853dd023 /2.3-1/macros/CCodeGeneration | |
parent | cdd9bf519d594b87c07193d2770b81a07829a50c (diff) | |
download | Scilab2C-28d16508c39756d1f143b44c33115530fd4a7653.tar.gz Scilab2C-28d16508c39756d1f143b44c33115530fd4a7653.tar.bz2 Scilab2C-28d16508c39756d1f143b44c33115530fd4a7653.zip |
Selectively add opencv related files if image processing functions are used
Diffstat (limited to '2.3-1/macros/CCodeGeneration')
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin | bin | 16292 -> 18232 bytes | |||
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci | 14 | ||||
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_Funcall.bin | bin | 73096 -> 73180 bytes | |||
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_Funcall.sci | 2 | ||||
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_InitHeader.bin | bin | 14064 -> 14140 bytes | |||
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_InitHeader.sci | 12 |
6 files changed, 18 insertions, 10 deletions
diff --git a/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin Binary files differindex 499d63a2..b4005914 100644 --- a/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin +++ b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin diff --git a/2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci index d1fc7e61..33a1d791 100644 --- a/2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci +++ b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci @@ -45,14 +45,22 @@ PrintStringInfo('Generating the final C code in:'+FinalCFileName,... // --------------------------------- // --- Finalize the header file. --- // --------------------------------- +if(SharedInfo.OpenCVUsed) + PrintStringInfo('#include ""cvcore.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""int_cvcore.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""cvhighgui.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""int_cvhighgui.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""cvimgproc.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""int_cvimgproc.hpp""',Pass1HeaderFileName,'file','y'); +end PrintStringInfo('/*',Pass1HeaderFileName,'file','y'); PrintStringInfo('** ---------------------------- ',Pass1HeaderFileName,'file','y'); PrintStringInfo('** --- End USER2C Includes. --- ',Pass1HeaderFileName,'file','y'); PrintStringInfo('** ---------------------------- ',Pass1HeaderFileName,'file','y'); PrintStringInfo('*/',Pass1HeaderFileName,'file','y'); -PrintStringInfo('#ifdef __cplusplus',Pass1HeaderFileName,'file','y'); -PrintStringInfo('} /* extern ""C"" */',Pass1HeaderFileName,'file','y'); -PrintStringInfo('#endif',Pass1HeaderFileName,'file','y'); +//PrintStringInfo('#ifdef __cplusplus',Pass1HeaderFileName,'file','y'); +//PrintStringInfo('} /* extern ""C"" */',Pass1HeaderFileName,'file','y'); +//PrintStringInfo('#endif',Pass1HeaderFileName,'file','y'); PrintStringInfo('#endif',Pass1HeaderFileName,'file','y'); // ------------------------------------- // --- End Finalize the header file. --- diff --git a/2.3-1/macros/CCodeGeneration/C_Funcall.bin b/2.3-1/macros/CCodeGeneration/C_Funcall.bin Binary files differindex fdfb38dd..0ae6c268 100644 --- a/2.3-1/macros/CCodeGeneration/C_Funcall.bin +++ b/2.3-1/macros/CCodeGeneration/C_Funcall.bin diff --git a/2.3-1/macros/CCodeGeneration/C_Funcall.sci b/2.3-1/macros/CCodeGeneration/C_Funcall.sci index 248b826f..431e4e98 100644 --- a/2.3-1/macros/CCodeGeneration/C_Funcall.sci +++ b/2.3-1/macros/CCodeGeneration/C_Funcall.sci @@ -437,7 +437,7 @@ else if (FlagCall == 0) // Add prototype to the header file - C_InitHeader(CCall+';',HeaderFileName,SharedInfo.Sci2CLibMainHeaderFName,Target); + C_InitHeader(CCall+';',HeaderFileName,SharedInfo.Sci2CLibMainHeaderFName,Target,SharedInfo.OpenCVUsed); // Add { at the beginning of the function. PrintStringInfo(' {',ReportFileName,'file','y'); diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin Binary files differindex 957ea506..567822c0 100644 --- a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin +++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci index bc6f2520..97dcf0d6 100644 --- a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci +++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci @@ -1,4 +1,4 @@ -function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,Target) +function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,Target,OpenCVUsed) // function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName) // ----------------------------------------------------------------- // //NUT: add description here @@ -19,7 +19,7 @@ function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,Target) // ------------------------------ // --- Check input arguments. --- // ------------------------------ -SCI2CNInArgCheck(argn(2),4,4); +SCI2CNInArgCheck(argn(2),5,5); // ----------------------- // --- Initialization. --- @@ -38,7 +38,7 @@ PrintStringInfo('** ------------------- ',HeaderFileName,'file','y'); PrintStringInfo('** ----- Target ------ ',HeaderFileName,'file','y'); PrintStringInfo('** ------------------- ',HeaderFileName,'file','y'); PrintStringInfo('*/',HeaderFileName,'file','y'); -PrintStringInfo('# define ' + Target + '1 1' ,HeaderFileName,'file','y'); +PrintStringInfo('#define ' + Target + '1 1' ,HeaderFileName,'file','y'); PrintStringInfo('/*',HeaderFileName,'file','y'); PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y'); PrintStringInfo('** --- SCI2C Includes. --- ',HeaderFileName,'file','y'); @@ -52,9 +52,9 @@ PrintStringInfo('** --------------------------- ',HeaderFileName,'file','y'); PrintStringInfo('*/',HeaderFileName,'file','y'); PrintStringInfo(' ',HeaderFileName,'file','y'); PrintStringInfo(' ',HeaderFileName,'file','y'); -PrintStringInfo('#ifdef __cplusplus',HeaderFileName,'file','y'); -PrintStringInfo('extern ""C"" {',HeaderFileName,'file','y'); -PrintStringInfo('#endif',HeaderFileName,'file','y'); +//PrintStringInfo('#ifdef __cplusplus',HeaderFileName,'file','y'); +//PrintStringInfo('extern ""C"" {',HeaderFileName,'file','y'); +//PrintStringInfo('#endif',HeaderFileName,'file','y'); PrintStringInfo('/*',HeaderFileName,'file','y'); PrintStringInfo('** ------------------- ',HeaderFileName,'file','y'); PrintStringInfo('** --- Prototypes. --- ',HeaderFileName,'file','y'); |