changeset 3108:95f38ad828e4

makefiles: Use port.mak for level 2 and 3 as well The port.mak defines the OS level, CPU arch etc so those are not defined in the makefiles. This allows sharing of makefiles between different ports. For now the level 3 build is limited to a few disk images, and has its own makefile. At a later point we can hopefully share makefiles between level 2 and 3, checking LEVEL when needed.
author Tormod Volden <debian.tormod@gmail.com>
date Sun, 28 Feb 2016 22:36:22 +0100
parents 3cce8745dd2e
children 118cd9951d24
files level2/coco3/makefile level3/coco3/makefile level3/coco3_6309/makefile level3/makefile
diffstat 4 files changed, 10 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/level2/coco3/makefile	Sun Feb 28 21:38:33 2016 +0100
+++ b/level2/coco3/makefile	Sun Feb 28 22:36:22 2016 +0100
@@ -1,12 +1,4 @@
-ifeq ($(CPU),)
-    CPU = 6809
-endif
-
-PORT = coco3
-MACHINE = Tandy Color Computer 3
-include $(NITROS9DIR)/rules.mak
-
-LEVEL		= 2
+include port.mak
 
 DISTRO		= $(CPU)L$(LEVEL)
 DISTRONAME	= nos9$(CPU)l$(LEVEL)
--- a/level3/coco3/makefile	Sun Feb 28 21:38:33 2016 +0100
+++ b/level3/coco3/makefile	Sun Feb 28 22:36:22 2016 +0100
@@ -1,12 +1,4 @@
-ifeq ($(CPU),)
-    CPU = 6809
-endif
-
-PORT = coco3
-MACHINE = Tandy Color Computer 3
-include $(NITROS9DIR)/rules.mak
-
-LEVEL		= 3
+include port.mak
 
 DISTRO		= $(CPU)L$(LEVEL)
 DISTRONAME	= nos9$(CPU)l$(LEVEL)
--- a/level3/coco3_6309/makefile	Sun Feb 28 21:38:33 2016 +0100
+++ b/level3/coco3_6309/makefile	Sun Feb 28 22:36:22 2016 +0100
@@ -1,3 +1,1 @@
-CPU=6309
 include ../coco3/makefile
-AFLAGS += -DH6309=1
--- a/level3/makefile	Sun Feb 28 21:38:33 2016 +0100
+++ b/level3/makefile	Sun Feb 28 22:36:22 2016 +0100
@@ -1,5 +1,5 @@
 include $(NITROS9DIR)/rules.mak
-LEVEL	= 3
+
 dirs	= coco3 coco3_6309
 ifdef PORTS
 dirs	= $(PORTS)
@@ -9,27 +9,27 @@
 all:
 	@$(ECHO) "**************************************************"
 	@$(ECHO) "*                                                *"
-	@$(ECHO) "*             NitrOS-9 Level $(LEVEL) Ports             *"
+	@$(ECHO) "*             NitrOS-9 Level 3 Ports             *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), $(MAKE) -C $(dir) &&) :
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
-	$(foreach dir, $(dirs), ($(CD) $(dir); make clean);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) clean &&) :
 
 # Make DSK images
 dsk:
-	$(foreach dir, $(dirs), $(MAKE) -C $(dir) dsk &&) :
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dsk &&) :
 
 # Copy DSK images
 dskcopy:
-	$(foreach dir, $(dirs), $(MAKE) -C $(dir) dskcopy &&) :
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dskcopy &&) :
 
 # Clean DSK images
 dskclean:
-	$(foreach dir, $(dirs), ($(CD) $(dir); make dskclean);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dskclean &&) :
 
 # Info
 info:
-	@$(foreach dir, $(dirs), $(MAKE) -C $(dir) info; $(ECHO);)
+	@$(foreach dir,$(dirs),$(MAKE) -C $(dir) info; $(ECHO);)