Skip to content

Commit d61f959

Browse files
Merge pull request #690 from pret/bugfix/keep_temps_in_builddir
.i and .s files should be under build/ when KEEP_TEMPS=1
2 parents bf6bfbd + 7f7ff65 commit d61f959

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ ifneq ($(KEEP_TEMPS),1)
301301
@echo "$(CC1) <flags> -o $@ $<"
302302
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
303303
else
304-
@$(CPP) $(CPPFLAGS) $< -o $*.i
305-
@$(PREPROC) $*.i charmap.txt | $(CC1) $(CFLAGS) -o $*.s
306-
@echo -e ".text\n\t.align\t2, 0\n" >> $*.s
307-
$(AS) $(ASFLAGS) -o $@ $*.s
304+
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
305+
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
306+
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
307+
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
308308
endif
309309

310310
$(C_BUILDDIR)/%.d: $(C_SUBDIR)/%.c

0 commit comments

Comments
 (0)