Kernel: The platform rules.mk should define the CPU used
authorWill Sowerbutts <will@sowerbutts.com>
Thu, 12 Feb 2015 21:01:52 +0000 (21:01 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Thu, 12 Feb 2015 21:04:00 +0000 (21:04 +0000)
This means that only the PLATFORM variable needs to be specified in
Kernel/Makefile, instead both PLATFORM and CPU in combination.

13 files changed:
Kernel/Makefile
Kernel/platform-8086test/rules.mk [new file with mode: 0644]
Kernel/platform-atarist/rules.mk [new file with mode: 0644]
Kernel/platform-dragon/rules.mk [new file with mode: 0644]
Kernel/platform-n8vem-mark4/README
Kernel/platform-n8vem-mark4/rules.mk [new file with mode: 0644]
Kernel/platform-p112/README
Kernel/platform-p112/rules.mk [new file with mode: 0644]
Kernel/platform-socz80/rules.mk [new file with mode: 0644]
Kernel/platform-tgl6502/rules.mk [new file with mode: 0644]
Kernel/platform-z80pack-lite/rules.mk [new file with mode: 0644]
Kernel/platform-z80pack/rules.mk [new file with mode: 0644]
Kernel/platform-zx128/rules.mk [new file with mode: 0644]

index 7906332..8272819 100644 (file)
@@ -1,15 +1,12 @@
 TARGET_LIST = platform-nc100 platform-micropack platform-pcw8256 platform-socz80 platform-zx128 platform-trs80 platform-z80pack platform-z80pack-lite platform-z80pack32 platform-dragon platform-tgl6502
 
 export TARGET= zx128
-export CPU = z80
 #export TARGET = dragon
-#export CPU = 6809
 #export TARGET = tgl6502
-#export CPU = 6502
-#export TARGET=atarist
-#export CPU = 68000
+#export TARGET = atarist
 #export TARGET = 8086test
-#export CPU = 8086
+#export TARGET = n8vem-mark4
+#export TARGET = p112
 
 export VERSION = "0.1"
 export SUBVERSION = "ac1"
@@ -21,8 +18,8 @@ ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
 all:   fuzix.bin
 
 
-include cpu-$(CPU)/rules.mk
 -include platform-$(TARGET)/rules.mk
+include cpu-$(CPU)/rules.mk
 
 
 
diff --git a/Kernel/platform-8086test/rules.mk b/Kernel/platform-8086test/rules.mk
new file mode 100644 (file)
index 0000000..6361df6
--- /dev/null
@@ -0,0 +1 @@
+export CPU = 8086
diff --git a/Kernel/platform-atarist/rules.mk b/Kernel/platform-atarist/rules.mk
new file mode 100644 (file)
index 0000000..df1c235
--- /dev/null
@@ -0,0 +1 @@
+export CPU = 68000
diff --git a/Kernel/platform-dragon/rules.mk b/Kernel/platform-dragon/rules.mk
new file mode 100644 (file)
index 0000000..e9abbba
--- /dev/null
@@ -0,0 +1 @@
+export CPU = 6809
index c21f37b..58cc7d6 100644 (file)
@@ -13,9 +13,8 @@ The PropIO V2 can be enabled by editing config.h and setting PROPIO2_IO_BASE to
 the base IO port address of the board. If enabled, the PropIO will be used as
 the system console.
 
-To build the kernel, edit the CPU and TARGET lines in Kernel/Makefile to read:
+To build the kernel, edit the TARGET line in Kernel/Makefile to read:
     export TARGET=n8vem-mark4
-    export CPU=z180
 Then run "make clean; make all" in the "Kernel" directory.
 
 There are two ways to boot the system.
diff --git a/Kernel/platform-n8vem-mark4/rules.mk b/Kernel/platform-n8vem-mark4/rules.mk
new file mode 100644 (file)
index 0000000..5597667
--- /dev/null
@@ -0,0 +1 @@
+export CPU = z180
index aa1933b..3df546c 100644 (file)
@@ -9,9 +9,8 @@ Supported hardware:
  - G-IDE hard disk drive controller
  - First serial port (ESCC channel A, tty1)
 
-To build the kernel, edit the CPU and TARGET lines in Kernel/Makefile to read:
+To build the kernel, edit the TARGET line in Kernel/Makefile to read:
     export TARGET=p112
-    export CPU=z180
 Then run "make clean; make all" in the "Kernel" directory.
 
 There are two ways to boot the system.
diff --git a/Kernel/platform-p112/rules.mk b/Kernel/platform-p112/rules.mk
new file mode 100644 (file)
index 0000000..5597667
--- /dev/null
@@ -0,0 +1 @@
+export CPU = z180
diff --git a/Kernel/platform-socz80/rules.mk b/Kernel/platform-socz80/rules.mk
new file mode 100644 (file)
index 0000000..3bffcde
--- /dev/null
@@ -0,0 +1 @@
+export CPU = z80
diff --git a/Kernel/platform-tgl6502/rules.mk b/Kernel/platform-tgl6502/rules.mk
new file mode 100644 (file)
index 0000000..eb53ebc
--- /dev/null
@@ -0,0 +1 @@
+export CPU = 6502
diff --git a/Kernel/platform-z80pack-lite/rules.mk b/Kernel/platform-z80pack-lite/rules.mk
new file mode 100644 (file)
index 0000000..3bffcde
--- /dev/null
@@ -0,0 +1 @@
+export CPU = z80
diff --git a/Kernel/platform-z80pack/rules.mk b/Kernel/platform-z80pack/rules.mk
new file mode 100644 (file)
index 0000000..3bffcde
--- /dev/null
@@ -0,0 +1 @@
+export CPU = z80
diff --git a/Kernel/platform-zx128/rules.mk b/Kernel/platform-zx128/rules.mk
new file mode 100644 (file)
index 0000000..3bffcde
--- /dev/null
@@ -0,0 +1 @@
+export CPU = z80