X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=as%2Fz80%2FMakefile.in;h=e005ab658f1f5307af986ce49cfe6dd636c344ce;hb=d60a9db49385f694bb4b5a33c4d4c21d2e05d254;hp=e330da5d42bae26f6475ce1f3842f0703fd09d2f;hpb=3a8a4c8f86116fda630a3687d41683a1552c7e6c;p=fw%2Fsdcc diff --git a/as/z80/Makefile.in b/as/z80/Makefile.in index e330da5d..e005ab65 100644 --- a/as/z80/Makefile.in +++ b/as/z80/Makefile.in @@ -3,40 +3,44 @@ srcdir = @srcdir@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -CPPFLAGS += @CPPFLAGS@ +include $(top_builddir)/Makefile.common -include $(top_builddir)Makefile.common +OBJDIR = obj$(EXT) -OBJDIR = obj/$(EXT) +UTILLIB = $(srcdir)/../../support/Util +UTILSRC = dbuf.c dbuf_string.c +UTILLIBOBJS = $(UTILSRC:%.c=$(OBJDIR)/%.o) -SDC = . +ASXXLIB = $(srcdir)/../asxxsrc +ASXXLIBSRC = strcmpi.c assym.c aslex.c asnoice.c +ASXXLIBOBJS = $(ASXXLIBSRC:%.c=$(OBJDIR)/%.o) -SLIBSRC = NewAlloc.c +SRC = asmain.c assubr.c \ + asexpr.c asdata.c aslist.c asout.c \ + z80ext.c z80pst.c z80mch.c z80adr.c +OBJS = $(SRC:%.c=$(OBJDIR)/%.o) -SRC = asdata.c asexpr.c aslex.c aslist.c asmain.c asout.c \ - assubr.c assym.c z80adr.c z80ext.c z80mch.c z80pst.c +ASSOURCES = $(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c) $(UTILSRC:%.c=$(UTILLIB)/%.c) -OBJS = $(SRC:%.c=$(OBJDIR)/%.o) -SLIBOBJS = $(SLIBSRC:%.c=$(OBJDIR)/%.o) +ASOBJECTS = $(OBJS) $(ASXXLIBOBJS) $(UTILLIBOBJS) -BINS = $(BUILDDIR)/as$(EXT)$(EXEEXT) +BINS = $(BUILDDIR)/as$(EXT)$(EXEEXT) -CFLAGS += $(CPPFLAGS) $(OPTS) -I. -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -CFLAGS += -funsigned-char -CFLAGS += -I$(SLIB) +CFLAGS += $(CPPFLAGS) $(OPTS) -I. -I$(srcdir)/../../support/Util -DINDEXLIB -DMLH_MAP -DUNIX -DSDK +CFLAGS += -funsigned-char -LDFLAGS += -lm $(EXTRALIBS) +LDFLAGS = @LDFLAGS@ -lm $(EXTRALIBS) -all: dep $(BINS) +all: dep $(BINS) dep: Makefile.dep -Makefile.dep: $(SRC) $(srcdir)/*.h - $(CPP) $(CPPFLAGS) $(M_OR_MM) $^ > Makefile.dep +Makefile.dep: $(ASSOURCES) $(srcdir)/*.h + $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) > Makefile.dep ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \ clean distclean mostlyclean realclean)" "" - include Makefile.dep + -include Makefile.dep endif # We need a '.stamp'-file in $(OBJDIR), because the time stamp @@ -49,14 +53,16 @@ $(OBJDIR)/.stamp: mkdir -p $(OBJDIR) touch $(OBJDIR)/.stamp -$(BINS): $(OBJS) $(SLIBOBJS) - $(CC) -o $(BINS) $(OBJS) $(SLIBOBJS) $(LDFLAGS) +$(BINS): $(ASOBJECTS) + $(CC) -o $(BINS) $(ASOBJECTS) $(LDFLAGS) +$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp + $(CC) -c $(CFLAGS) -o $@ $< -$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp +$(OBJDIR)/%.o: $(ASXXLIB)/%.c $(OBJDIR)/.stamp $(CC) -c $(CFLAGS) -o $@ $< -$(OBJDIR)/%.o: $(SLIB)/%.c $(OBJDIR)/.stamp +$(OBJDIR)/%.o: $(UTILLIB)/%.c $(OBJDIR)/.stamp $(CC) -c $(CFLAGS) -o $@ $< _as-z80: