Made cc65 build compatible with make.exe from GnuWin32 and cmd.exe. We just live without the phony targets when building with cmd.exe - the next cc65 release will make the whole sed thingy obsolete anyway :-)

This commit is contained in:
oliverschmidt 2011-01-23 16:30:30 +00:00
parent 10a7bb2579
commit 8c87f85a1d

View file

@ -30,7 +30,7 @@
#
# Author: Oliver Schmidt <ol.sc@web.de>
#
# $Id: Makefile.6502,v 1.34 2010/10/23 13:48:06 oliverschmidt Exp $
# $Id: Makefile.6502,v 1.35 2011/01/23 16:30:30 oliverschmidt Exp $
#
ifndef CC65_HOME
@ -76,13 +76,17 @@ AROPTS = a
.SUFFIXES:
CMD.EXE := $(shell echo)
CUSTOM_RULE_C_TO_OBJECTDIR_O = 1
$(OBJECTDIR)/%.o: %.c
$(CC) $(CFLAGS) --create-dep $< -o $(@:.o=.s)
@$(AS) $(ASFLAGS) $(@:.o=.s) -o $@
@sed -e 's!.s:!.o:!' -e 's!\t! !' < $(@:.o=.u) > $(@:.o=.d)
@sed -e "s!.s:!.o:!" -e "s!\t! !" < $(@:.o=.u) > $(@:.o=.d)
@rm -f $(@:.o=.s) $(@:.o=.u)
ifndef CMD.EXE
@$(FINALIZE_DEPENDENCY)
endif
CUSTOM_RULE_C_TO_CO = 1
%.co: %.c