z80 assembler and linker now part of ./configure ; make ; make install
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 5 Mar 2000 21:41:51 +0000 (21:41 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 5 Mar 2000 21:41:51 +0000 (21:41 +0000)
process.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@154 4a8a32a2-be11-0410-ad9d-d568d2c75423

Makefile
as/z80/Makefile.in [new file with mode: 0644]
as/z80/clean.mk [new file with mode: 0644]
as/z80/conf.mk [new file with mode: 0644]
configure
configure.in
link/z80/Makefile.in [new file with mode: 0644]
link/z80/clean.mk [new file with mode: 0644]
link/z80/conf.mk [new file with mode: 0644]

index 5a0ee19dbee87982888615d54dc7379726cddeba..01c94352db2a16d6e63e6104a3b846a5509ae9ec 100644 (file)
--- 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 (file)
index 0000000..d95c692
--- /dev/null
@@ -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 (file)
index 0000000..4c86a51
--- /dev/null
@@ -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 (file)
index 0000000..524efe6
--- /dev/null
@@ -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
index af0aed7a60ecb04e147a8864d956f84f5e119431..8f3abbce63b59cce61912177103206e0f49590de 100755 (executable)
--- 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
index 7904913056ed4775ddca3884b1902073b8c01686..eef18b70ff7aa30e2b2e5939d7ccfae984d9f865 100755 (executable)
@@ -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 (file)
index 0000000..467a53a
--- /dev/null
@@ -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 (file)
index 0000000..911047e
--- /dev/null
@@ -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 (file)
index 0000000..1ce4956
--- /dev/null
@@ -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