From: bernhardheld Date: Sat, 19 Apr 2003 10:06:51 +0000 (+0000) Subject: * as/z80/Makefile: fix permanent rebuild of z80 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=4815311479c4e14e1d040c8688b906f69ecea722;p=fw%2Fsdcc * as/z80/Makefile: fix permanent rebuild of z80 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2540 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 2ebb0997..85ac1092 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-04-19 Bernhard Held + + * as/z80/Makefile: fix permanent rebuild of z80 + 2003-04-18 Kevin Vigor * src/SDCCopt.c: add special case optimization to replace modulo by diff --git a/as/z80/Makefile b/as/z80/Makefile index a6d706fb..9a914813 100644 --- a/as/z80/Makefile +++ b/as/z80/Makefile @@ -31,17 +31,24 @@ Makefile.dep: $(SRC) *.h include Makefile.dep -$(OBJDIR): +# We need a '.stamp'-file in $(OBJDIR), because the time stamp +# of $(OBJDIR) itself is always updated, when a file in $(OBJDIR) +# is updated. A rule like +# $(OBJDIR)/anyfile: $(OBJDIR) +# will always force a remake (at least on Linux ext2). + +$(OBJDIR)/.stamp: mkdir -p $(OBJDIR) + touch $(OBJDIR)/.stamp $(BINS): $(OBJS) $(SLIBOBJS) $(CC) -o $(BINS) $(OBJS) $(SLIBOBJS) $(LDFLAGS) -$(OBJDIR)/%.o: %.c $(OBJDIR) +$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp $(CC) -c $(CFLAGS) -o $@ $< -$(OBJDIR)/%.o: $(SLIB)/%.c $(OBJDIR) +$(OBJDIR)/%.o: $(SLIB)/%.c $(OBJDIR)/.stamp $(CC) -c $(CFLAGS) -o $@ $< _as-z80: