changeset 1119:f86ef3d1d7c9

Makefiles have been redone to take advantage of size and Make features
author boisy
date Sat, 12 Apr 2003 17:19:55 +0000
parents 68e5259da516
children cc7dd0fd4e63
files 3rdparty/drivers/makefile 3rdparty/fmgrs/makefile 3rdparty/makefile 3rdparty/packages/makefile 3rdparty/utils/makefile level1/makefile level1/modules/term32.asm level2/cmds/makefile level2/makefile makefile rules.mak
diffstat 11 files changed, 87 insertions(+), 114 deletions(-) [+]
line wrap: on
line diff
--- a/3rdparty/drivers/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/3rdparty/drivers/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -1,5 +1,7 @@
 include ../../Makefile.rules
 
+dirs	= burke disto emudsk flash flashpak ide s16550 sdisk sdisk3 tccc
+
 # Make all components
 all:
 	@$(ECHO) "*********************************************"
@@ -7,26 +9,8 @@
 	@$(ECHO) "*          3rd Party Device Drivers         *"
 	@$(ECHO) "*                                           *"
 	@$(ECHO) "*********************************************"
-	$(CD) burke; make
-	$(CD) disto; make
-	$(CD) emudsk; make
-	$(CD) flash; make
-	$(CD) flashpak; make
-	$(CD) ide; make
-	$(CD) s16550; make
-	$(CD) sdisk; make
-	$(CD) sdisk3; make
-	$(CD) tccc; make
+	$(foreach dir, $(dirs), $(CD) $(dir); make; $(CD) ..;)
 
 # Clean all components
 clean:
-	-$(CD) burke; make clean
-	-$(CD) disto; make clean
-	-$(CD) emudsk; make clean
-	-$(CD) flash; make clean
-	-$(CD) flashpak; make clean
-	-$(CD) ide; make clean
-	-$(CD) s16550; make clean
-	-$(CD) sdisk; make clean
-	-$(CD) sdisk3; make clean
-	-$(CD) tccc; make clean
+	$(foreach dir, $(dirs), $(CD) $(dir); make clean; $(CD) ..;)
--- a/3rdparty/fmgrs/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/3rdparty/fmgrs/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -1,16 +1,24 @@
 include ../../Makefile.rules
 
+dirs	= msf
+
 # Make all components
 all:
 	@$(ECHO) "*********************************************"
 	@$(ECHO) "*                                           *"
-	@$(ECHO) "*           3rd Party File Managers         *"
+	@$(ECHO) "*               File Managers               *"
 	@$(ECHO) "*                                           *"
 	@$(ECHO) "*********************************************"
-	$(CD) msf; make
-#	$(CD) cdf; make
+	$(foreach dir, $(dirs), $(CD) $(dir); make; $(CD) ..;)
 
 # Clean all components
 clean:
-	$(CD) msf; make clean
-#	$(CD) cdf; make clean
+	$(foreach dir, $(dirs), $(CD) $(dir); make clean; $(CD) ..;)
+
+# Make DSK images
+dsk:
+	$(foreach dir, $(dirs), $(CD) $(dir); make dsk; $(CD) ..;)
+
+# Copy DSK images
+dskcopy:
+	$(foreach dir, $(dirs), $(CD) $(dir); make dskcopy; $(CD) ..;)
--- a/3rdparty/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/3rdparty/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -1,26 +1,28 @@
 include ../Makefile.rules
 
+dirs	= booters drivers fmgrs p2mods subrtns utils packages
+
 # Make all components
 all:
 	@$(ECHO) "*********************************************"
 	@$(ECHO) "*                                           *"
-	@$(ECHO) "*             3rd Party Software            *"
+	@$(ECHO) "*            3rd Party Software             *"
 	@$(ECHO) "*                                           *"
 	@$(ECHO) "*********************************************"
-	$(CD) booters; make
-	$(CD) drivers; make
-	$(CD) fmgrs; make
-	$(CD) p2mods; make
-	$(CD) subrtns; make
-	$(CD) utils; make
-	$(CD) packages; make
+	$(foreach dir, $(dirs), $(CD) $(dir); make; $(CD) ..;)
 
 # Clean all components
-clean:
-	-$(CD) booters; make clean
-	-$(CD) drivers; make clean
-	-$(CD) fmgrs; make clean
-	-$(CD) p2mods; make clean
-	-$(CD) subrtns; make clean
-	-$(CD) utils; make clean
-	-$(CD) packages; make clean
+clean:	dskclean
+	$(foreach dir, $(dirs), $(CD) $(dir); make clean; $(CD) ..;)
+
+# Make DSK images
+dsk:
+	$(foreach dir, $(dirs), $(CD) $(dir); make dsk; $(CD) ..;)
+
+# Clean DSK images
+dskclean:
+	$(foreach dir, $(dirs), $(CD) $(dir); make dskclean; $(CD) ..;)
+
+# Copy DSK images
+dskcopy: dsk
+	$(foreach dir, $(dirs), $(CD) $(dir); make dskcopy; $(CD) ..;)
--- a/3rdparty/packages/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/3rdparty/packages/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -1,34 +1,16 @@
 include ../../Makefile.rules
 
-DEPENDS		= ./Makefile
+dirs	= basic09 cc fsim2 koronis kq3 kyumgai lsl mm multivue rof subsim
 
+# Make all components
 all:
 	@$(ECHO) "*********************************************"
 	@$(ECHO) "*                                           *"
-	@$(ECHO) "*           3rd Software Packages           *"
+	@$(ECHO) "*            3rd Party Packages             *"
 	@$(ECHO) "*                                           *"
 	@$(ECHO) "*********************************************"
-	$(CD) basic09; make
-	$(CD) cc; make
-	$(CD) fsim2; make
-	$(CD) koronis; make
-	$(CD) kq3; make
-	$(CD) kyumgai; make
-	$(CD) lsl; make
-	$(CD) mm; make
-	$(CD) multivue; make
-	$(CD) rof; make
-	$(CD) subsim; make
+	$(foreach dir, $(dirs), $(CD) $(dir); make; $(CD) ..;)
 
+# Clean all components
 clean:
-	-$(CD) basic09; make clean
-	-$(CD) cc; make clean
-	-$(CD) fsim2; make clean
-	-$(CD) koronis; make clean
-	-$(CD) kq3; make clean
-	-$(CD) kyumgai; make clean
-	-$(CD) lsl; make clean
-	-$(CD) mm; make clean
-	-$(CD) multivue; make clean
-	-$(CD) rof; make clean
-	-$(CD) subsim; make clean
+	$(foreach dir, $(dirs), $(CD) $(dir); make clean; $(CD) ..;)
--- a/3rdparty/utils/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/3rdparty/utils/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -1,15 +1,24 @@
 include ../../Makefile.rules
 
+dirs	= boisy dasm smartwatch winfo
+
 # Make all components
 all:
-	$(CD) boisy; make
-	$(CD) dasm; make
-	$(CD) smartwatch; make
-	$(CD) winfo; make
+	@$(ECHO) "*********************************************"
+	@$(ECHO) "*                                           *"
+	@$(ECHO) "*                 Utilities                 *"
+	@$(ECHO) "*                                           *"
+	@$(ECHO) "*********************************************"
+	$(foreach dir, $(dirs), $(CD) $(dir); make; $(CD) ..;)
 
 # Clean all components
 clean:
-	-$(CD) boisy; make clean
-	-$(CD) dasm; make clean
-	-$(CD) smartwatch; make clean
-	-$(CD) winfo; make clean
+	$(foreach dir, $(dirs), $(CD) $(dir); make clean; $(CD) ..;)
+
+# Make DSK images
+dsk:
+	$(foreach dir, $(dirs), $(CD) $(dir); make dsk; $(CD) ..;)
+
+# Copy DSK images
+dskcopy:
+	$(foreach dir, $(dirs), $(CD) $(dir); make dskcopy; $(CD) ..;)
--- a/level1/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/level1/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -41,6 +41,9 @@
 
 dsk: all $(PACKAGENAME)
 
+dskcopy: dsk
+	$(CP) $(DSK1) $(DSK2) $(PACKAGENAME) $(DSKDIR)
+
 $(PACKAGENAME): $(DSK1) $(DSK2)
 	$(ZIP) $(PACKAGENAME) $(DSK1) $(DSK2) ReadMe ChangeLog
 
--- a/level1/modules/term32.asm	Sat Apr 12 15:31:18 2003 +0000
+++ b/level1/modules/term32.asm	Sat Apr 12 17:19:55 2003 +0000
@@ -7,7 +7,6 @@
 * ------------------------------------------------------------------
 *        From Tandy OS-9 Level One VR 02.00.00
 
-
          nam   TERM
          ttl   VDG screen device descriptor
 
--- a/level2/cmds/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/level2/cmds/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -1,5 +1,7 @@
 include ../../Makefile.rules
 
+vpath %.asm $(LEVEL1)/CMDS:$(3RDPARTY)/packages/basic09
+
 DEPENDS		= ./Makefile
 
 CMDS		= asm attr backup binex build cmp cobbler copy cputype \
@@ -16,16 +18,6 @@
 UTILPAK1	= attr copy del deldir dir display list makdir mdir \
 		mfree procs rename tmode
 
-BASIC09FILES	= runb.asm gfx.asm gfx2.asm inkey.asm syscall.asm
-LEVEL1FILES	= asm.asm attr.asm backup.asm binex.asm build.asm cmp.asm \
-		cobbler.asm copy.asm cputype.asm date.asm dcheck.asm \
-		debug.asm ded.asm deiniz.asm del.asm deldir.asm devs.asm dir.asm \
-		disasm.asm display.asm dmode.asm dsave.asm dump.asm echo.asm \
-		edit.asm error.asm exbin.asm exmode.asm format.asm free.asm \
-		help.asm ident.asm iniz.asm irqs.asm link.asm \
-		list.asm load.asm login.asm makdir.asm merge.asm os9gen.asm pd.asm rename.asm \
-		save.asm setime.asm sleep.asm tee.asm tmode.asm touch.asm tuneport.asm tsmon.asm verify.asm xmode.asm
-
 ALLOBJS		= $(CMDS) $(SUBS)
 
 # Files not compilable by os9asm: config
@@ -50,14 +42,8 @@
 	@ls -l $@
 	@$(ECHO) ""
 
-$(BASIC09FILES): $(BASEDIR)/3rdparty/packages/basic09/$@
-	-$(SOFTLINK) $(BASEDIR)/3rdparty/packages/basic09/$@
-
-$(LEVEL1FILES): $(LEVEL1)/CMDS/$@
-	-$(SOFTLINK) $(LEVEL1)/CMDS/$@
-
 clean:
-	$(RM) shell utilpak1 $(ALLOBJS) $(BASIC09FILES) $(LEVEL1FILES)
+	$(RM) shell utilpak1 $(ALLOBJS)
 
 showobjs:
 	@$(ECHO) shell utilpak1 $(ALLOBJS)
--- a/level2/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/level2/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -46,12 +46,15 @@
 
 dsk: all $(PACKAGENAME)
 
+dskcopy: dsk
+	$(CP) $(DSK1) $(DSK2) $(PACKAGENAME) $(DSKDIR)
+
 $(PACKAGENAME): $(DSK1) $(DSK2)
 	$(ZIP) $(PACKAGENAME) $(DSK1) $(DSK2) ReadMe ChangeLog
 
 $(DSK1):
 	-$(RM) $(DSK1)
-	$(OS9FORMAT_DS40) $(DSK1) -n"OS-9 Level Two System Disk"
+	$(OS9FORMAT_DS40) -e $(DSK1) -n"OS-9 Level Two System Disk"
 	$(OS9GEN) $(DSK1) -b=BOOTFILES/$(BOOTFILE) -t=BOOTFILES/$(KERNEL)
 	$(MAKDIR) $(DSK1),CMDS
 	$(MAKDIR) $(DSK1),SYS
@@ -65,6 +68,6 @@
 
 $(DSK2):
 	-$(RM) $(DSK2)
-	$(OS9FORMAT_DS40) $(DSK2) -n"OS-9 Level Two Modules Disk"
+	$(OS9FORMAT_DS40) -e $(DSK2) -n"OS-9 Level Two Modules Disk"
 	$(MAKDIR) $(DSK2),MODULES
 	$(CD) MODULES; $(CP) $(MODULES) ../$(DSK2),MODULES
--- a/makefile	Sat Apr 12 15:31:18 2003 +0000
+++ b/makefile	Sat Apr 12 17:19:55 2003 +0000
@@ -1,33 +1,29 @@
-# OS-9 Distributions Makefile
-#
-
 include Makefile.rules
 
+dirs	= $(LEVEL1) $(LEVEL2) $(NLEVEL2) $(3RDPARTY)
+ 
 # Make all components
 all:
-	$(CD) $(LEVEL1); make
-	$(CD) $(LEVEL2); make
-	$(CD) $(NLEVEL2); make
-	$(CD) $(3RDPARTY); make
+	@$(ECHO) "*********************************************"
+	@$(ECHO) "*                                           *"
+	@$(ECHO) "*          COCOOS9 SOURCE PROJECT           *"
+	@$(ECHO) "*                                           *"
+	@$(ECHO) "*********************************************"
+	$(foreach dir, $(dirs), $(CD) $(dir); make; $(CD) ..;)
 
 # Clean all components
-clean:
-	-$(CD) $(LEVEL1); make clean
-	-$(CD) $(LEVEL2); make clean
-	-$(CD) $(NLEVEL2); make clean
-	-$(CD) $(3RDPARTY); make clean
+clean:  dskclean
+	$(foreach dir, $(dirs), $(CD) $(dir); make clean; $(CD) ..;)
 
 # Make DSK images
-dsk:
-	-$(CD) $(LEVEL1); make dsk
-	-$(CD) $(LEVEL2); make dsk
-	-$(CD) $(NLEVEL2); make dsk
-#	-$(CD) $(3RDPARTY); make clean
+dsk:	all
+	$(foreach dir, $(dirs), $(CD) $(dir); make dsk; $(CD) ..;)
 
 # Clean DSK images
 dskclean:
-	-$(CD) $(LEVEL1); make dskclean
-	-$(CD) $(LEVEL2); make dskclean
-	-$(CD) $(NLEVEL2); make dskclean
-#	-$(CD) $(3RDPARTY); make clean
+	$(foreach dir, $(dirs), $(CD) $(dir); make dskclean; $(CD) ..;)
+	rm -f $(DSKDIR)/*
 
+# Copy DSK images
+dskcopy: dsk
+	$(foreach dir, $(dirs), $(CD) $(dir); make dskcopy; $(CD) ..;)
--- a/rules.mak	Sat Apr 12 15:31:18 2003 +0000
+++ b/rules.mak	Sat Apr 12 17:19:55 2003 +0000
@@ -5,6 +5,7 @@
 BASEDIR		= $(HOME)/os9
 OS9TOOLSDIR	= /usr/local/bin
 DEFDIR		= $(BASEDIR)/defs
+DSKDIR		= $(BASEDIR)/dsks
 
 
 #################### DO NOT CHANGE ANYTHING BELOW THIS LINE ####################