tcbuilder 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/tcbuild.js +6 -3
  2. package/package.json +1 -1
package/dist/tcbuild.js CHANGED
@@ -183,7 +183,7 @@ function _groupFile(fileName, flags, options) {
183
183
  existisFile.flags += ` ${flags}`;
184
184
  if (options?.toBeRemoved)
185
185
  existisFile.toBeRemoved.push(options.toBeRemoved);
186
- if (options?.includeInFinalOutput)
186
+ if (options?.includeInFinalOutput !== undefined)
187
187
  existisFile.includeInFinalOutput = options.includeInFinalOutput;
188
188
  }
189
189
  else {
@@ -195,7 +195,7 @@ function _groupFile(fileName, flags, options) {
195
195
  };
196
196
  if (options?.toBeRemoved)
197
197
  currentGroup.files[file].toBeRemoved.push(options.toBeRemoved);
198
- if (options?.includeInFinalOutput)
198
+ if (options?.includeInFinalOutput !== undefined)
199
199
  currentGroup.files[file].includeInFinalOutput = options.includeInFinalOutput;
200
200
  }
201
201
  }
@@ -237,6 +237,7 @@ process.once('beforeExit', async () => {
237
237
  targets += `${out_name}${group.finalExeSuffix} `;
238
238
  let recipe = '';
239
239
  let objects = '';
240
+ let non_objects = '';
240
241
  for (const fileName in group.files) {
241
242
  if (!Object.hasOwn(group.files, fileName))
242
243
  continue;
@@ -245,6 +246,8 @@ process.once('beforeExit', async () => {
245
246
  let obj_out = `${build_dir}/${fileName}.o`;
246
247
  if (file.includeInFinalOutput)
247
248
  objects += ` ${obj_out}`;
249
+ else
250
+ non_objects += ` ${obj_out}`;
248
251
  let final_flags = `${ /* globalSrcFileFlags */''} ${file.flags ?? ''}`;
249
252
  for (const ext of fileName.split('.').slice(1)) {
250
253
  if (ext.length <= 0)
@@ -260,7 +263,7 @@ process.once('beforeExit', async () => {
260
263
  if (group.finalFlagsToBeRemoved.length > 0)
261
264
  for (const remove of group.finalFlagsToBeRemoved)
262
265
  group_final_flags = group_final_flags.replaceAll(remove, '');
263
- make_out += `OBJ_${name}=${objects}\n${out_name}${group.finalExeSuffix}:$(OBJ_${name})\n\t${group.finalExe} ${group_final_flags}\n${recipe}-include $(OBJ_${name}:=.d)\n`;
266
+ make_out += `OBJ_${name}=${objects}\n${out_name}${group.finalExeSuffix}:$(OBJ_${name}) ${non_objects}\n\t${group.finalExe} ${group_final_flags}\n${recipe}-include $(OBJ_${name}:=.d)\n`;
264
267
  }
265
268
  await fs.promises.writeFile('./Makefile', `all: ${targets}\n${make_out}`);
266
269
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tcbuilder",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Build System",
5
5
  "homepage": "https://github.com/umutfahriozkan/tcbuild#readme",
6
6
  "bugs": {