diff options
author | Juan J. Martinez <jjm@usebox.net> | 2021-10-31 11:21:49 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2021-10-31 11:27:40 +0000 |
commit | a4d6d71612f38c8e164449971855fdde7976b3be (patch) | |
tree | dc6ac238776915844c70de4400472e079fadf771 | |
parent | 61e8f78ee6b2c9495ff9b20c57c44ed5e4b5f891 (diff) | |
download | ubox-msx-lib-a4d6d71612f38c8e164449971855fdde7976b3be.tar.gz ubox-msx-lib-a4d6d71612f38c8e164449971855fdde7976b3be.zip |
SDCC versions and support for current snapshots
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | config.env | 3 | ||||
-rw-r--r-- | game/src/Makefile | 2 | ||||
-rw-r--r-- | src/spman/Makefile | 4 | ||||
-rw-r--r-- | tests/Makefile | 1 |
5 files changed, 18 insertions, 3 deletions
@@ -16,10 +16,19 @@ deep knowledge of the system. ## Requirements - - SDCC (3.9.0 or later recommended) - GNU Make (others may work) - a POSIX compatible environment +The [SDCC](http://sdcc.sourceforge.net/) compiler is also needed. Check the +following table for some hints on compatibility. + +| Version | Compatible | Comments | +| --- | --- | --- | +| 3.9.0 | yes | - | +| 4.0.0 | yes | - | +| 4.1.0 | no | At least on Linux amd64 it generates broken Z80 code | +| sdcc-20211031-12748 | yes | Needs option in `config.env`, edit the file for details | + If you want to build the example you will also need: - python 3 @@ -2,3 +2,6 @@ # Size of the resulting ROM ROM_MAX=0x8000 + +# uncomment for sdcc-20211031-12748 or later +#EXTRA_CFLAGS += --sdcccall 0 diff --git a/game/src/Makefile b/game/src/Makefile index e42313d..52f01ea 100644 --- a/game/src/Makefile +++ b/game/src/Makefile @@ -14,7 +14,7 @@ LIBS := -lubox -lspman -lmplayer -lap CC := sdcc AS := sdasz80 AR := sdcclib -CFLAGS := -mz80 --Werror -I../../include -I../generated --fsigned-char --std-sdcc99 --opt-code-speed +CFLAGS := -mz80 --Werror -I../../include -I../generated --fsigned-char --std-sdcc99 --opt-code-speed $(EXTRA_CFLAGS) LDFLAGS := -L../../lib -L. --no-std-crt0 --fomit-frame-pointer all: $(OUTPUT)/$(TARGET).rom diff --git a/src/spman/Makefile b/src/spman/Makefile index 49b7de9..690e72f 100644 --- a/src/spman/Makefile +++ b/src/spman/Makefile @@ -1,9 +1,11 @@ LIB := ../../lib/spman.lib all: $(LIB) +include ../../config.env + CC := sdcc AR := sdar -CFLAGS := -mz80 --Werror -I../../include --fsigned-char --std-sdcc99 --opt-code-speed +CFLAGS := -mz80 --Werror -I../../include --fsigned-char --std-sdcc99 --opt-code-speed $(EXTRA_CFLAGS) SOURCES := $(wildcard *.c) OBJS := $(patsubst %.c,%.rel,$(SOURCES)) diff --git a/tests/Makefile b/tests/Makefile index 32933e0..bc972c0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,6 +7,7 @@ include ../config.env TESTS := $(wildcard test_*.py) test: + @sdcc --version python3 -m unittest $(TESTS) .PHONY: test default |