plugins/c_ext/c_ext.py
changeset 419 1cdae505be9e
parent 402 984e238e63d0
child 420 c093ec48f2fd
equal deleted inserted replaced
417:a895ae50b737 419:1cdae505be9e
   322         text += "int __init_%s(int argc,char **argv)\n{\n"%location_str
   322         text += "int __init_%s(int argc,char **argv)\n{\n"%location_str
   323         text += self.CFile.initFunction.gettext()
   323         text += self.CFile.initFunction.gettext()
   324         text += "  return 0;\n"
   324         text += "  return 0;\n"
   325         text += "\n}\n\n"
   325         text += "\n}\n\n"
   326         
   326         
   327         text += "void __cleanup_%s()\n{\n"%location_str
   327         text += "void __cleanup_%s(void)\n{\n"%location_str
   328         text += self.CFile.cleanUpFunction.gettext()
   328         text += self.CFile.cleanUpFunction.gettext()
   329         text += "\n}\n\n"
   329         text += "\n}\n\n"
   330         
   330         
   331         text += "void __retrieve_%s()\n{\n"%location_str
   331         text += "void __retrieve_%s(void)\n{\n"%location_str
   332         text += self.CFile.retrieveFunction.gettext()
   332         text += self.CFile.retrieveFunction.gettext()
   333         text += "\n}\n\n"
   333         text += "\n}\n\n"
   334         
   334         
   335         text += "void __publish_%s()\n{\n"%location_str
   335         text += "void __publish_%s(void)\n{\n"%location_str
   336         text += self.CFile.publishFunction.gettext()
   336         text += self.CFile.publishFunction.gettext()
   337         text += "\n}\n\n"
   337         text += "\n}\n\n"
   338         
   338         
   339         Gen_Cfile_path = os.path.join(buildpath, "CFile_%s.c"%location_str)
   339         Gen_Cfile_path = os.path.join(buildpath, "CFile_%s.c"%location_str)
   340         cfile = open(Gen_Cfile_path,'w')
   340         cfile = open(Gen_Cfile_path,'w')
   341         cfile.write(text)
   341         cfile.write(text)
   342         cfile.close()
   342         cfile.close()
   343         
   343         
   344         if wx.Platform == '__WXMSW__':
   344         matiec_flags = " -I%s"%os.path.abspath(self.GetPlugRoot().GetIECLibPath())
   345             matiec_flags = " -I../../matiec/lib"
       
   346         else:
       
   347             matiec_flags = " -I../matiec/lib"
       
   348         
   345         
   349         return [(Gen_Cfile_path, str(self.CExtension.getCFLAGS() + matiec_flags))],str(self.CExtension.getLDFLAGS()),True
   346         return [(Gen_Cfile_path, str(self.CExtension.getCFLAGS() + matiec_flags))],str(self.CExtension.getLDFLAGS()),True
   350         
   347         
   351 #-------------------------------------------------------------------------------
   348 #-------------------------------------------------------------------------------
   352 #                      Current Buffering Management Functions
   349 #                      Current Buffering Management Functions