beremiz

Parents f3a27721100f
Children be649777f96a
ToolChain: add IEC library include paths to CFLAGS when building C code from extensions.

This allows generated C code to include beremiz.h, and other IEC types definitions.
--- a/ProjectController.py Thu Jul 04 11:24:04 2024 +0200
+++ b/ProjectController.py Tue Jul 09 11:40:36 2024 +0200
@@ -1226,6 +1226,13 @@
self.logger.write_error(traceback.format_exc())
return False
+ # Extensions also need plcCFLAGS in case they include beremiz.h
+ CTNLocationCFilesAndCFLAGS = [
+ (loc, [
+ (code, self.plcCFLAGS+" "+cflags)
+ for code,cflags in code_and_cflags], do_calls)
+ for loc, code_and_cflags, do_calls in CTNLocationCFilesAndCFLAGS]
+
self.LocationCFilesAndCFLAGS = LibCFilesAndCFLAGS + \
CTNLocationCFilesAndCFLAGS
self.LDFLAGS = CTNLDFLAGS + LibLDFLAGS