commit 3c3f8ca7a9acc53b9846871a7988174143c1d3ff
parent 60071c4a3c439e4abd196751578976166c305fb9
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 23 Aug 2017 19:32:47 +0200
[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.
Diffstat:
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/config.mk b/config.mk
@@ -2,21 +2,19 @@
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
# 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
# Can be c89 or c99
diff --git a/driver/posix/Makefile b/driver/posix/Makefile
@@ -17,7 +17,7 @@ all: scc scpp
cp scc scpp ../../rootdir/bin/
dep:
- PREFIX=$(PREFIX) USEQBE=$(USEQBE) ./gendep.sh $(TARGET)
+ PREFIX=$(PREFIX) USEQBE=$(USEQBE) ./gendep.sh $(TARGETS)
$(OBJ): $(HDR)
diff --git a/driver/posix/gendep.sh b/driver/posix/gendep.sh
@@ -9,7 +9,7 @@ PREFIX=${PREFIX-$HOME}
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\"