From 24d36cacbba9c00046134de17afd35900366150b Mon Sep 17 00:00:00 2001 From: sandeep Date: Sun, 5 Mar 2000 21:41:51 +0000 Subject: [PATCH] z80 assembler and linker now part of ./configure ; make ; make install process. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@154 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- Makefile | 2 +- as/z80/Makefile.in | 97 +++++++++++++++++++++++++++++++++++++++++++ as/z80/clean.mk | 23 +++++++++++ as/z80/conf.mk | 23 +++++++++++ configure | 6 ++- configure.in | 2 + link/z80/Makefile.in | 98 ++++++++++++++++++++++++++++++++++++++++++++ link/z80/clean.mk | 23 +++++++++++ link/z80/conf.mk | 23 +++++++++++ 9 files changed, 295 insertions(+), 2 deletions(-) create mode 100644 as/z80/Makefile.in create mode 100644 as/z80/clean.mk create mode 100644 as/z80/conf.mk create mode 100644 link/z80/Makefile.in create mode 100644 link/z80/clean.mk create mode 100644 link/z80/conf.mk diff --git a/Makefile b/Makefile index 5a0ee19d..01c94352 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ AUTOCONF = autoconf PRJDIR = . PKGS = support/gc support/cpp \ - src as/mcs51 debugger/mcs51 \ + src as/mcs51 as/z80 link/z80 debugger/mcs51 \ device/include device/lib sim/ucsim PRJS = sim/ucsim PORTS = mcs51 z80 diff --git a/as/z80/Makefile.in b/as/z80/Makefile.in new file mode 100644 index 00000000..d95c6926 --- /dev/null +++ b/as/z80/Makefile.in @@ -0,0 +1,97 @@ +# +# +# + +VERSION = @VERSION@ +VERSIONHI = @VERSIONHI@ +VERSIONLO = @VERSIONLO@ +VERSIONP = @VERSIONP@ + +SHELL = /bin/sh +CC = @CC@ +CPP = @CPP@ +INSTALL = @INSTALL@ + +PRJDIR = ../.. + +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = ${prefix} +bindir = ${exec_prefix}/bin +libdir = ${exec_prefix}/lib +datadir = ${prefix}/share +includedir = ${prefix}/include +mandir = ${prefix}/man +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +infodir = ${prefix}/info + +CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) +CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -funsigned-char -ggdb +M_OR_MM = @M_OR_MM@ +LDFLAGS = @LDFLAGS@ -lm + +ASOBJECTS = asdata.o asexpr.o aslex.o aslist.o asmain.o asout.o \ + assubr.o assym.o z80adr.o z80ext.o z80mch.o z80pst.o +ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS)) + +ASXZ80 = $(PRJDIR)/bin/as-z80 + +# Compiling entire program or any subproject +# ------------------------------------------ +all: checkconf $(ASXZ80) + +$(ASXZ80): $(ASOBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS) + +# Compiling and installing everything and runing test +# --------------------------------------------------- +install: all installdirs + $(INSTALL) -s $(ASXZ80) $(bindir)/as-z80 + +# Deleting all the installed files +# -------------------------------- +uninstall: + rm -f $(bindir)/as-z80 + + +# Performing self-test +# -------------------- +check: + + +# Performing installation test +# ---------------------------- +installcheck: + + +# Creating installation directories +# --------------------------------- +installdirs: + $(INSTALL) -d $(bindir) + + +# Creating dependencies +# --------------------- +dep: Makefile.dep + +Makefile.dep: $(ASSOURCES) *.h $(PRJDIR)/*.h + $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) >Makefile.dep + +include Makefile.dep +include clean.mk + +# My rules +# -------- +.c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + + +# Remaking configuration +# ---------------------- +checkconf: + @if [ -f $(PRJDIR)/devel ]; then\ + $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\ + fi + +# End of Makefile diff --git a/as/z80/clean.mk b/as/z80/clean.mk new file mode 100644 index 00000000..4c86a51d --- /dev/null +++ b/as/z80/clean.mk @@ -0,0 +1,23 @@ +# Deleting all files created by building the program +# -------------------------------------------------- +clean: + rm -f *core *[%~] *.[oa] + rm -f .[a-z]*~ + rm -f $(PRJDIR)/as-z80 as-z80 + + +# Deleting all files created by configuring or building the program +# ----------------------------------------------------------------- +distclean: clean + rm -f Makefile *.dep + + +# Like clean but some files may still exist +# ----------------------------------------- +mostlyclean: clean + + +# Deleting everything that can reconstructed by this Makefile. It deletes +# everything deleted by distclean plus files created by bison, etc. +# ----------------------------------------------------------------------- +realclean: distclean diff --git a/as/z80/conf.mk b/as/z80/conf.mk new file mode 100644 index 00000000..524efe65 --- /dev/null +++ b/as/z80/conf.mk @@ -0,0 +1,23 @@ +# Deleting all files created by building the program +# -------------------------------------------------- +clean: + rm -f *core *[%~] *.[oa] + rm -f .[a-z]*~ + rm -f $(PRJDIR)/as-z80 as-z80 + + +# Deleting all files created by configuring or building the program +# ----------------------------------------------------------------- +distclean: clean + rm -f Makefile *.dep + + +# Like clean but some files may still exist +# ----------------------------------------- +mostlyclean: clean + + +# Deleting everything that can reconstructed by this Makefile. It deletes +# everything deleted by distclean plus files created by bison, etc. +# ----------------------------------------------------------------------- +realclean: distclean diff --git a/configure b/configure index af0aed7a..8f3abbce 100755 --- a/configure +++ b/configure @@ -523,7 +523,7 @@ fi -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2599,6 +2599,8 @@ trap 'rm -fr `echo "main.mk:main_in.mk support/gc/Makefile src/Makefile as/mcs51/Makefile +as/z80/Makefile +link/z80/Makefile support/cpp/Makefile device/include/Makefile device/lib/Makefile @@ -2702,6 +2704,8 @@ CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk support/gc/Makefile src/Makefile as/mcs51/Makefile +as/z80/Makefile +link/z80/Makefile support/cpp/Makefile device/include/Makefile device/lib/Makefile diff --git a/configure.in b/configure.in index 79049130..eef18b70 100755 --- a/configure.in +++ b/configure.in @@ -200,6 +200,8 @@ AC_OUTPUT(main.mk:main_in.mk support/gc/Makefile src/Makefile as/mcs51/Makefile +as/z80/Makefile +link/z80/Makefile support/cpp/Makefile device/include/Makefile device/lib/Makefile diff --git a/link/z80/Makefile.in b/link/z80/Makefile.in new file mode 100644 index 00000000..467a53af --- /dev/null +++ b/link/z80/Makefile.in @@ -0,0 +1,98 @@ +# +# +# + +VERSION = @VERSION@ +VERSIONHI = @VERSIONHI@ +VERSIONLO = @VERSIONLO@ +VERSIONP = @VERSIONP@ + +SHELL = /bin/sh +CC = @CC@ +CPP = @CPP@ +INSTALL = @INSTALL@ + +PRJDIR = ../.. + +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = ${prefix} +bindir = ${exec_prefix}/bin +libdir = ${exec_prefix}/lib +datadir = ${prefix}/share +includedir = ${prefix}/include +mandir = ${prefix}/man +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +infodir = ${prefix}/info + +CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80 +CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -DSDK_VERSION_STRING="\"3.0.0\"" -DTARGET_STRING="\"gbz80\"" -funsigned-char +M_OR_MM = @M_OR_MM@ +LDFLAGS = @LDFLAGS@ -lm + +LKOBJECTS = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \ + lklibr.o lklist.o lkmain.o lkrloc.o lks19.o lksym.o \ + lkgb.o lkgg.o +LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS)) + +LKZ80 = $(PRJDIR)/bin/link-z80 + +# Compiling entire program or any subproject +# ------------------------------------------ +all: checkconf $(LKZ80) + +$(LKZ80): $(LKOBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS) + +# Compiling and installing everything and runing test +# --------------------------------------------------- +install: all installdirs + $(INSTALL) -s $(LKZ80) $(bindir)/link-z80 + +# Deleting all the installed files +# -------------------------------- +uninstall: + rm -f $(bindir)/link-z80 + + +# Performing self-test +# -------------------- +check: + + +# Performing installation test +# ---------------------------- +installcheck: + + +# Creating installation directories +# --------------------------------- +installdirs: + $(INSTALL) -d $(bindir) + + +# Creating dependencies +# --------------------- +dep: Makefile.dep + +Makefile.dep: $(LKSOURCES) *.h $(PRJDIR)/*.h + $(CPP) $(CPPFLAGS) $(M_OR_MM) $(LKSOURCES) >Makefile.dep + +include Makefile.dep +include clean.mk + +# My rules +# -------- +.c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + + +# Remaking configuration +# ---------------------- +checkconf: + @if [ -f $(PRJDIR)/devel ]; then\ + $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\ + fi + +# End of Makefile diff --git a/link/z80/clean.mk b/link/z80/clean.mk new file mode 100644 index 00000000..911047eb --- /dev/null +++ b/link/z80/clean.mk @@ -0,0 +1,23 @@ +# Deleting all files created by building the program +# -------------------------------------------------- +clean: + rm -f *core *[%~] *.[oa] + rm -f .[a-z]*~ + rm -f $(PRJDIR)/link-z80 link-z80 + + +# Deleting all files created by configuring or building the program +# ----------------------------------------------------------------- +distclean: clean + rm -f Makefile *.dep + + +# Like clean but some files may still exist +# ----------------------------------------- +mostlyclean: clean + + +# Deleting everything that can reconstructed by this Makefile. It deletes +# everything deleted by distclean plus files created by bison, etc. +# ----------------------------------------------------------------------- +realclean: distclean diff --git a/link/z80/conf.mk b/link/z80/conf.mk new file mode 100644 index 00000000..1ce49560 --- /dev/null +++ b/link/z80/conf.mk @@ -0,0 +1,23 @@ +# Deleting all files created by building the program +# -------------------------------------------------- +clean: + rm -f *core *[%~] *.[oa] + rm -f .[a-z]*~ + rm -f $(PRJDIR)/link-z80 link-z80 + + +# Deleting all files created by configuring or building the program +# ----------------------------------------------------------------- +distclean: clean + rm -f Makefile *.dep + + +# Like clean but some files may still exist +# ----------------------------------------- +mostlyclean: clean + + +# Deleting everything that can reconstructed by this Makefile. It deletes +# everything deleted by distclean plus files created by bison, etc. +# ----------------------------------------------------------------------- +realclean: distclean -- 2.47.2