shithub: scc

Download patch

ref: adda8658b4dcc5aa6b0ad7be0ba7b8ef3707112c
parent: ff07f46fcbf903b916be3f35063a5004bbb90daf
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Aug 23 15:32:47 EDT 2017

[driver] Remove TARGET macro

After this change the default target is the first target
in the target list. This change makes easier to keep
consistency between availabe target list and default target.

--- a/config.mk
+++ b/config.mk
@@ -2,10 +2,10 @@
 VERSION = 0.1
 
 ## Customize below to fit your system
-# TARGET is defined by backend-arch-abi-sys
+# TARGETS is defined by a list of backend-arch-abi-sys. First
+# element of the list becomes the default target
 
-TARGETS = z80-scc-dos-com \
-          amd64-sysv-linux-elf \
+TARGETS = amd64-sysv-linux-elf \
           i386-sysv-linux-elf \
           amd64-sysv-openbsd-elf
 
@@ -12,10 +12,8 @@
 # USEQBE selects QBE by default in the targets that support it
 USEQBE = 1
 
-#MKQBE enable build of 
+#MKQBE enable build of qbe backends
 MKQBE = 1
-
-TARGET  = amd64-sys-linux-elf
 
 DRIVER = posix
 
--- a/driver/posix/Makefile
+++ b/driver/posix/Makefile
@@ -17,7 +17,7 @@
 	cp scc scpp ../../rootdir/bin/
 
 dep:
-	PREFIX=$(PREFIX) USEQBE=$(USEQBE) ./gendep.sh $(TARGET)
+	PREFIX=$(PREFIX) USEQBE=$(USEQBE) ./gendep.sh $(TARGETS)
 
 $(OBJ): $(HDR)
 
--- a/driver/posix/gendep.sh
+++ b/driver/posix/gendep.sh
@@ -9,7 +9,7 @@
 USEQBE=${USEQBE:-1}
 
 echo $@ |
-(IFS=- read arch abi sys format r
+(IFS='- 	' read arch abi sys format r
 echo \#define PREFIX \"$PREFIX\"
 echo \#define USEQBE $USEQBE
 echo \#define ARCH \"$arch\"