- snprintf(buf, sizeof(buf), "%s %s/%s %s %s -o %s",
- task_bins[TASK_COMPILE],
- curdir,
- template->sourcefile,
- qcflags,
- template->compileflags,
- template->tempfilename
- );
+ if (template->testflags && !strcmp(template->testflags, "-no-defs")) {
+ snprintf(buf, sizeof(buf), "%s %s/%s %s %s -o %s",
+ task_bins[TASK_COMPILE],
+ curdir,
+ template->sourcefile,
+ qcflags,
+ template->compileflags,
+ template->tempfilename
+ );
+ } else {
+ snprintf(buf, sizeof(buf), "%s %s/%s %s/%s %s %s -o %s",
+ task_bins[TASK_COMPILE],
+ curdir,
+ defs,
+ curdir,
+ template->sourcefile,
+ qcflags,
+ template->compileflags,
+ template->tempfilename
+ );
+ }