equal
deleted
inserted
replaced
120 |
120 |
121 c_code = """ |
121 c_code = """ |
122 #include "iec_types_all.h" |
122 #include "iec_types_all.h" |
123 #include "beremiz.h" |
123 #include "beremiz.h" |
124 """ |
124 """ |
|
125 config = self.GetConfig() |
125 c_code += self.modeldata.GenerateC(c_path, locstr, self.GetConfig()) |
126 c_code += self.modeldata.GenerateC(c_path, locstr, self.GetConfig()) |
126 |
127 |
127 with open(c_path, 'w') as c_file: |
128 with open(c_path, 'w') as c_file: |
128 c_file.write(c_code) |
129 c_file.write(c_code) |
129 |
130 |
130 LDFLAGS = [' "' + os.path.join(PahoMqttCLibraryPath, "libpaho-mqtt3cs.a") + '"', '-lssl', '-lcrypto'] |
131 if config["AuthType"] == "x509": |
|
132 static_lib = "libpaho-mqtt3cs.a" |
|
133 libs = ['-lssl', '-lcrypto'] |
|
134 else: |
|
135 static_lib = "libpaho-mqtt3c.a" |
|
136 libs = [] |
|
137 |
|
138 LDFLAGS = [' "' + os.path.join(PahoMqttCLibraryPath, static_lib) + '"'] + libs |
131 |
139 |
132 CFLAGS = ' '.join(['-I"' + path + '"' for path in PahoMqttCIncludePaths]) |
140 CFLAGS = ' '.join(['-I"' + path + '"' for path in PahoMqttCIncludePaths]) |
133 |
141 |
134 return [(c_path, CFLAGS)], LDFLAGS, True |
142 return [(c_path, CFLAGS)], LDFLAGS, True |
135 |
143 |