X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=as%2Fmcs51%2FMakefile.in;h=3cd5b2f16f6c45624f174cc7d2fa72901eb13248;hb=3bd25d75bcad68055bb616dcc29dde8a2965965e;hp=055f170b371ccd0726edbbf875b2224ae538fde5;hpb=b76f3688525239a9cdc69f56413ae0b6be8487a7;p=fw%2Fsdcc diff --git a/as/mcs51/Makefile.in b/as/mcs51/Makefile.in index 055f170b..3cd5b2f1 100644 --- a/as/mcs51/Makefile.in +++ b/as/mcs51/Makefile.in @@ -7,66 +7,78 @@ VERSIONHI = @VERSIONHI@ VERSIONLO = @VERSIONLO@ VERSIONP = @VERSIONP@ -SHELL = /bin/sh -CC = @CC@ -CPP = @CPP@ -INSTALL = @INSTALL@ +SHELL = /bin/sh +CC = @CC@ +CPP = @CPP@ +INSTALL = @INSTALL@ +STRIP = @STRIP@ -PRJDIR = ../.. +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ -srcdir = @srcdir@ -prefix = @prefix@ +srcdir = @srcdir@ +prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ datadir = @datadir@ +datarootdir = @datarootdir@ includedir = @includedir@ mandir = @mandir@ man1dir = $(mandir)/man1 man2dir = $(mandir)/man2 infodir = @info@ -CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -CFLAGS = @CFLAGS@ -Wall -M_OR_MM = @M_OR_MM@ -LDFLAGS = @LDFLAGS@ +EXEEXT = @EXEEXT@ -ASOBJECTS = asmain.o aslex.o assym.o assubr.o asnoice.o \ - asexpr.o asdata.o aslist.o asout.o asstore.o \ - i51ext.o i51pst.o i51mch.o i51adr.o -ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS)) +VPATH = @srcdir@ -LKOBJECTS = lkmain.o lkhead.o lkarea.o lkdata.o \ - lkeval.o lklex.o lksym.o lkrloc.o \ - lklibr.o lklist.o lkihx.o lks19.o \ - lkstore.o lknoice.o -LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS)) +CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir) +CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../../support/Util +M_OR_MM = @M_OR_MM@ +LDFLAGS = @LDFLAGS@ -ASX8051 = $(PRJDIR)/bin/asx8051 -ASLINK = $(PRJDIR)/bin/aslink +OBJDIR = obj +UTILLIB = $(srcdir)/../../support/Util +UTILSRC = dbuf.c dbuf_string.c +UTILLIBOBJS = $(UTILSRC:%.c=$(OBJDIR)/%.o) + +ASXXLIB = $(srcdir)/../asxxsrc +ASXXLIBSRC = strcmpi.c assym.c aslex.c asnoice.c +ASXXLIBOBJS = $(ASXXLIBSRC:%.c=$(OBJDIR)/%.o) + +SRC = asmain.c assubr.c \ + asexpr.c asdata.c aslist.c asout.c \ + i51ext.c i51pst.c i51mch.c i51adr.c +OBJS = $(SRC:%.c=$(OBJDIR)/%.o) + +ASSOURCES = $(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c) $(UTILSRC:%.c=$(UTILLIB)/%.c) + +ASOBJECTS = $(OBJS) $(ASXXLIBOBJS) $(UTILLIBOBJS) + +ASX = $(top_builddir)/bin/asx8051$(EXEEXT) +DEST = $(DESTDIR)$(bindir)/asx8051$(EXEEXT) + +transform = @program_transform_name@ # Compiling entire program or any subproject # ------------------------------------------ -all: checkconf $(ASX8051) $(ASLINK) +all: checkconf $(ASX) -$(ASX8051): $(ASOBJECTS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS) +$(ASX): $(ASOBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS) -$(ASLINK): $(LKOBJECTS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS) - -# Compiling and installing everything and runing test -# --------------------------------------------------- +# Compiling and installing everything and running test +# ---------------------------------------------------- install: all installdirs - $(INSTALL) -s $(ASX8051) $(bindir)/asx8051 - $(INSTALL) -s $(ASLINK) $(bindir)/aslink - + $(INSTALL) $(ASX) `echo $(DEST)|sed '$(transform)'` + $(STRIP) `echo $(DEST)|sed '$(transform)'` # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/asx8051 $(bindir)/aslink + rm -f $(DEST) # Performing self-test @@ -82,30 +94,43 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies # --------------------- dep: Makefile.dep -Makefile.dep: $(ASSOURCES) $(LKSOURCES) *.h $(PRJDIR)/*.h - $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) $(LKSOURCES) >Makefile.dep +Makefile.dep: $(ASSOURCES) $(srcdir)/*.h + $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep -include Makefile.dep -include clean.mk +ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \ + clean distclean mostlyclean realclean)" "" + -include Makefile.dep +endif +include $(srcdir)/clean.mk # My rules # -------- -.c.o: - $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< +$(OBJDIR)/.stamp: + mkdir -p $(OBJDIR) + touch $(OBJDIR)/.stamp + +$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp + $(CC) -c $(CFLAGS) -o $@ $< + +$(OBJDIR)/%.o: $(ASXXLIB)/%.c $(OBJDIR)/.stamp + $(CC) -c $(CFLAGS) -o $@ $< + +$(OBJDIR)/%.o: $(UTILLIB)/%.c $(OBJDIR)/.stamp + $(CC) -c $(CFLAGS) -o $@ $< # Remaking configuration # ---------------------- checkconf: - @if [ -f $(PRJDIR)/devel ]; then\ - $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\ + @if [ -f $(top_builddir)/devel ]; then\ + $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\ fi # End of Makefile