diff --git a/Makefile b/Makefile index 5741977ec..69173a556 100644 --- a/Makefile +++ b/Makefile @@ -308,7 +308,7 @@ endif ifeq ($(SCAN_DEPS),1) $(info Scanning deps start $(shell date +%s%3N)) ifeq ($(NODEP),1) -$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c +$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c ifeq (,$(KEEP_TEMPS)) @echo "$(CC1) -o $@ $<" @$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ - @@ -325,17 +325,17 @@ ifeq (,$$(KEEP_TEMPS)) @echo "$$(CC1) -o $$@ $$<" @$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ - else - @$$(CPP) $$(CPPFLAGS) $$< -o $$(C_BUILDDIR)/$$*.i - @$$(PREPROC) $$(C_BUILDDIR)/$$*.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(C_BUILDDIR)/$$*.s - @echo -e ".text\n\t.align\t2, 0\n" >> $$(C_BUILDDIR)/$$*.s - $$(AS) $$(ASFLAGS) -o $$@ $$(C_BUILDDIR)/$$*.s + @$$(CPP) $$(CPPFLAGS) $$< -o $$(C_BUILDDIR)/$3.i + @$$(PREPROC) $$(C_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(C_BUILDDIR)/$3.s + @echo -e ".text\n\t.align\t2, 0\n" >> $$(C_BUILDDIR)/$3.s + $$(AS) $$(ASFLAGS) -o $$@ $$(C_BUILDDIR)/$3.s endif endef -$(foreach src, $(C_SRCS), $(eval $(call C_DEP,$(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o, $(src)),$(src)))) +$(foreach src, $(C_SRCS), $(eval $(call C_DEP,$(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(src)),$(src),$(patsubst $(C_SUBDIR)/%.c,%,$(src))))) endif ifeq ($(NODEP),1) -$(GFLIB_BUILDDIR)/%.o : $(GFLIB_SUBDIR)/%.c $$(c_dep) +$(GFLIB_BUILDDIR)/%.o: $(GFLIB_SUBDIR)/%.c $$(c_dep) ifeq (,$(KEEP_TEMPS)) @echo "$(CC1) -o $@ $<" @$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ - @@ -352,18 +352,18 @@ ifeq (,$$(KEEP_TEMPS)) @echo "$$(CC1) -o $$@ $$<" @$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ - else - @$$(CPP) $$(CPPFLAGS) $$< -o $$(GFLIB_BUILDDIR)/$$*.i - @$$(PREPROC) $$(GFLIB_BUILDDIR)/$$*.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(GFLIB_BUILDDIR)/$$*.s - @echo -e ".text\n\t.align\t2, 0\n" >> $$(GFLIB_BUILDDIR)/$$*.s - $$(AS) $$(ASFLAGS) -o $$@ $$(GFLIB_BUILDDIR)/$$*.s + @$$(CPP) $$(CPPFLAGS) $$< -o $$(GFLIB_BUILDDIR)/$3.i + @$$(PREPROC) $$(GFLIB_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(GFLIB_BUILDDIR)/$3.s + @echo -e ".text\n\t.align\t2, 0\n" >> $$(GFLIB_BUILDDIR)/$3.s + $$(AS) $$(ASFLAGS) -o $$@ $$(GFLIB_BUILDDIR)/$3.s endif endef -$(foreach src, $(GFLIB_SRCS), $(eval $(call GFLIB_DEP,$(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o, $(src)),$(src)))) +$(foreach src, $(GFLIB_SRCS), $(eval $(call GFLIB_DEP,$(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o, $(src)),$(src),$(patsubst $(GFLIB_SUBDIR)/%.c,%, $(src))))) endif ifeq ($(NODEP),1) $(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s - $(AS) $(ASFLAGS) -o $@ $< + $(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@ else define SRC_ASM_DATA_DEP $1: $2 $$(shell $(SCANINC) -I include -I "" $2)