From e317c37f03710514522c04732e1b89226a17debd Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Thu, 18 Feb 2021 09:17:56 -0800 Subject: [PATCH 1/3] Move OSARCHDIR defn from makefile-tail to makefile-header --- bin/makefile-header | 2 ++ bin/makefile-tail | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/makefile-header b/bin/makefile-header index deb5a00..705a7b5 100755 --- a/bin/makefile-header +++ b/bin/makefile-header @@ -32,3 +32,5 @@ LDFLAGS = LDELDFLAGS = LDEETHERLDFLAGS = +# OSARCHDIR is the os/architecture dir, where executables all go. +OSARCHDIR = ../$(OSARCHNAME)/ diff --git a/bin/makefile-tail b/bin/makefile-tail index d106021..0c58564 100644 --- a/bin/makefile-tail +++ b/bin/makefile-tail @@ -33,10 +33,6 @@ # 3. makeright -e init # 4. follow the instructions on {eris}sunloadup>howto-loadup-sunlisp.txt - -# OSARCHDIR is the os/architecture dir, where executables all go. -OSARCHDIR = ../$(OSARCHNAME)/ - REQUIRED-INCS = $(INCDIR)version.h $(INCDIR)maiko/platform.h CFLAGS = $(OPTFLAGS) $(DFLAGS) From 966a0bd7e0690c14c4a8152bb17a307680df789d Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Thu, 18 Feb 2021 10:33:30 -0800 Subject: [PATCH 2/3] Move default target out of makefile-tail to more specific makefile fragments The default targets differ depending on the display type and whether networking is configured in or not, so it's more appropriate in the individual fragments --- bin/makefile-cygwin.x86_64-x | 2 +- bin/makefile-freebsd.386-x | 2 +- bin/makefile-linux.386-x | 2 +- bin/makefile-linux.armv7l-x | 2 +- bin/makefile-linux.x86_64-x | 2 +- bin/makefile-openbsd.x86_64-x | 2 +- bin/makefile-sunos5.386-x | 2 +- bin/makefile-sunos5.i386-x | 2 +- bin/makefile-sunos5.sparc-x | 2 +- bin/makefile-sunos5.x86_64-x | 2 +- bin/makefile-tail | 3 --- 11 files changed, 10 insertions(+), 13 deletions(-) diff --git a/bin/makefile-cygwin.x86_64-x b/bin/makefile-cygwin.x86_64-x index 8196c5a..f280cba 100644 --- a/bin/makefile-cygwin.x86_64-x +++ b/bin/makefile-cygwin.x86_64-x @@ -25,4 +25,4 @@ LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde +default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-freebsd.386-x b/bin/makefile-freebsd.386-x index d4cbfe9..1187c8b 100644 --- a/bin/makefile-freebsd.386-x +++ b/bin/makefile-freebsd.386-x @@ -24,4 +24,4 @@ LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde +default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-linux.386-x b/bin/makefile-linux.386-x index 7081981..b25198d 100644 --- a/bin/makefile-linux.386-x +++ b/bin/makefile-linux.386-x @@ -24,4 +24,4 @@ LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde +default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-linux.armv7l-x b/bin/makefile-linux.armv7l-x index b86729e..1f2f156 100644 --- a/bin/makefile-linux.armv7l-x +++ b/bin/makefile-linux.armv7l-x @@ -24,4 +24,4 @@ LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde +default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-linux.x86_64-x b/bin/makefile-linux.x86_64-x index 8196c5a..f280cba 100644 --- a/bin/makefile-linux.x86_64-x +++ b/bin/makefile-linux.x86_64-x @@ -25,4 +25,4 @@ LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde +default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-openbsd.x86_64-x b/bin/makefile-openbsd.x86_64-x index 05c1752..b95e5f5 100644 --- a/bin/makefile-openbsd.x86_64-x +++ b/bin/makefile-openbsd.x86_64-x @@ -24,4 +24,4 @@ LDELDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde +default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-sunos5.386-x b/bin/makefile-sunos5.386-x index f3a62e1..b22e33b 100644 --- a/bin/makefile-sunos5.386-x +++ b/bin/makefile-sunos5.386-x @@ -47,4 +47,4 @@ DLPIFILES = # $(OBJECTDIR)dlpi.o OBJECTDIR = ../$(RELEASENAME)/ -default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether +default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-sunos5.i386-x b/bin/makefile-sunos5.i386-x index 733023b..74a8bb6 100644 --- a/bin/makefile-sunos5.i386-x +++ b/bin/makefile-sunos5.i386-x @@ -48,4 +48,4 @@ DLPIFILES = $(OBJECTDIR)dlpi.o OBJECTDIR = ../$(RELEASENAME)/ -default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether +default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-sunos5.sparc-x b/bin/makefile-sunos5.sparc-x index 1540e33..931d228 100644 --- a/bin/makefile-sunos5.sparc-x +++ b/bin/makefile-sunos5.sparc-x @@ -55,4 +55,4 @@ DLPIFILES = $(OBJECTDIR)dlpi.o OBJECTDIR = ../$(RELEASENAME)/ -default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether +default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-sunos5.x86_64-x b/bin/makefile-sunos5.x86_64-x index 7f0644e..923544d 100644 --- a/bin/makefile-sunos5.x86_64-x +++ b/bin/makefile-sunos5.x86_64-x @@ -48,4 +48,4 @@ DLPIFILES = $(OBJECTDIR)dlpi.o OBJECTDIR = ../$(RELEASENAME)/ -default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether +default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether ../$(OSARCHNAME)/ldex diff --git a/bin/makefile-tail b/bin/makefile-tail index 0c58564..dcff93b 100644 --- a/bin/makefile-tail +++ b/bin/makefile-tail @@ -149,9 +149,6 @@ EXTFILES = $(OBJECTDIR)usrsubr.o # Development targets - copyprotect is OFF here ################################################################################ -default: $(OSARCHDIR)lde $(OSARCHDIR)$(LDENAME) $(OSARCHDIR)ldeether \ - $(OSARCHDIR)tstsout $(OSARCHDIR)setsout - $(OSARCHDIR)lde: $(OBJECTDIR)ldeboot.o $(OBJECTDIR)unixfork.o $(CC) $(OBJECTDIR)ldeboot.o $(OBJECTDIR)unixfork.o $(LDELDFLAGS) -o $(OSARCHDIR)lde From aa32c8347b9bce692404113e23ba88d33c553836 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Thu, 18 Feb 2021 11:12:14 -0800 Subject: [PATCH 3/3] Improve process of building ldeinit to allow for different options on different OSs --- ...file-init.386 => makefile-init-darwin.386} | 5 +-- bin/makefile-init-darwin.aarch64 | 28 ++++++++++++++++ ...-init.sparc => makefile-init-sunos5.sparc} | 32 ++++++++----------- bin/makeright | 2 +- 4 files changed, 46 insertions(+), 21 deletions(-) rename bin/{makefile-init.386 => makefile-init-darwin.386} (83%) create mode 100644 bin/makefile-init-darwin.aarch64 rename bin/{makefile-init.sparc => makefile-init-sunos5.sparc} (71%) diff --git a/bin/makefile-init.386 b/bin/makefile-init-darwin.386 similarity index 83% rename from bin/makefile-init.386 rename to bin/makefile-init-darwin.386 index 4d43e34..c7aaa62 100644 --- a/bin/makefile-init.386 +++ b/bin/makefile-init-darwin.386 @@ -17,11 +17,12 @@ XFLAGS = -I/opt/X11/include -DXWINDOW # OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it OPTFLAGS = -O0 -g -DFLAGS = $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT -DTRACE -DOPTRACE +DEBUGFLAGS = +DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT LDFLAGS = -L/usr/X11/lib -lX11 -lm LDELDFLAGS = -L/usr/X11/lib -lX11 -lm OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde +default : ../$(OSARCHNAME)/ldeinit diff --git a/bin/makefile-init-darwin.aarch64 b/bin/makefile-init-darwin.aarch64 new file mode 100644 index 0000000..1314d4f --- /dev/null +++ b/bin/makefile-init-darwin.aarch64 @@ -0,0 +1,28 @@ +# Options for MacOS, aarch64 processor, X windows, for INIT processing + +CC = clang $(CLANG_CFLAGS) + +XFILES = $(OBJECTDIR)xmkicon.o \ + $(OBJECTDIR)xbbt.o \ + $(OBJECTDIR)dspif.o \ + $(OBJECTDIR)xinit.o \ + $(OBJECTDIR)xscroll.o \ + $(OBJECTDIR)xcursor.o \ + $(OBJECTDIR)xlspwin.o \ + $(OBJECTDIR)xrdopt.o \ + $(OBJECTDIR)xwinman.o + + +XFLAGS = -I/opt/X11/include -DXWINDOW + +# OPTFLAGS is normally -O2. +OPTFLAGS = -O0 -g3 +DEBUGFLAGS = # -DDEBUG -DOPTRACE +DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT + +LDFLAGS = -L/opt/X11/lib -lX11 -lm +LDELDFLAGS = -L/opt/X11/lib -lX11 -lm + +OBJECTDIR = ../$(RELEASENAME)/ + +default : ../$(OSARCHNAME)/ldeinit diff --git a/bin/makefile-init.sparc b/bin/makefile-init-sunos5.sparc similarity index 71% rename from bin/makefile-init.sparc rename to bin/makefile-init-sunos5.sparc index 6aaabd2..c8ced0b 100644 --- a/bin/makefile-init.sparc +++ b/bin/makefile-init-sunos5.sparc @@ -18,24 +18,22 @@ # Options for SPARC under Solaris-2 operating system, X windows. -CC = gcc +CC = cc -m32 $(DEVSTUDIO_CFLAGS) -XFILES = $(OBJECTDIR)xlspwin.o \ - $(OBJECTDIR)xbbt.o \ - $(OBJECTDIR)xmkicon.o \ - $(OBJECTDIR)xrdopt.o \ +XFILES = $(OBJECTDIR)xmkicon.o \ + $(OBJECTDIR)xbbt.o \ + $(OBJECTDIR)dspif.o \ + $(OBJECTDIR)xinit.o \ $(OBJECTDIR)xscroll.o \ $(OBJECTDIR)xcursor.o \ - $(OBJECTDIR)xwinman.o \ - $(OBJECTDIR)dspif.o \ - $(OBJECTDIR)kbdif.o \ - $(OBJECTDIR)xinit.o + $(OBJECTDIR)xlspwin.o \ + $(OBJECTDIR)xrdopt.o \ + $(OBJECTDIR)xwinman.o - -XFLAGS = -DXWINDOW -I/usr/openwin/include +XFLAGS = -DXWINDOW # OPTFLAGS is normally -g for MAKEINIT, as it needs debugging often. -OPTFLAGS = -g3 -O +OPTFLAGS = -g3 -O0 # Set any debugging options in DEBUGFLAGS. E.g., to enable stack # checking, use -DSTACKCHECK; to enable the fn-call-time stack @@ -43,9 +41,7 @@ OPTFLAGS = -g3 -O DEBUGFLAGS = # -DSTACKCHECK -DFNSTKCHECK -MACHINEFLAGS = -DOS5 -DUSE_DLPI \ - -I$(OPENWINHOME)/include \ - -DLOCK_X_UPDATES +MACHINEFLAGS = -DOS5 -DUSE_DLPI -DLOCK_X_UPDATES # The LDEINIT wants to have NOVERSION set, so we don't hang up on # any change-over in versions. @@ -57,12 +53,12 @@ DFLAGS = -DINIT \ -DNOVERSION -DRELEASE=351 -LDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl -LDELDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl +LDFLAGS = -lX11 -lc -lm -lsocket -lnsl +LDELDFLAGS = -lX11 -lc -lm -lsocket -lnsl LDEETHERLDFLAGS = -lc -lm -lsocket -lnsl DLPIFILES = $(OBJECTDIR)dlpi.o OBJECTDIR = ../$(RELEASENAME)/ -default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether +default : ../$(OSARCHNAME)/ldeinit diff --git a/bin/makeright b/bin/makeright index 4cdd76e..9f2ab0c 100755 --- a/bin/makeright +++ b/bin/makeright @@ -59,7 +59,7 @@ osversion=`osversion` echo "making so far for ${osversion} on ${architecture}." case "$display" in init) display=single - releasename=init.${architecture} + releasename=init-${osversion}.${architecture} ldename=ldeinit ;; single) releasename=${osversion}.${architecture}