mirror of
https://github.com/gbdk-2020/gbdk-2020.git
synced 2026-02-20 00:32:21 +01:00
removed sdcc and added maccer, fixed some compilation issues
This commit is contained in:
16
Makefile
16
Makefile
@@ -27,10 +27,13 @@ TARGETCXXFLAGS =
|
||||
|
||||
# Directory containing the source to sdcc
|
||||
SDCCDIR = $(TOPDIR)/sdcc
|
||||
#SDCCDIR = $(ZGB_PATH)/../env/SDCC
|
||||
# Directory containing the source to gbdk-lib
|
||||
GBDKLIBDIR = $(TOPDIR)/gbdk-lib
|
||||
# Directory containing the source to gbdk-support
|
||||
GBDKSUPPORTDIR = $(TOPDIR)/gbdk-support
|
||||
# Directory containing the source to maccer
|
||||
MACCERDIR = $(TOPDIR)/maccer
|
||||
|
||||
# Base setup
|
||||
# Extension to add to executables
|
||||
@@ -50,7 +53,7 @@ NOISELOG = $(TOPDIR)/noise.log
|
||||
|
||||
all: native-build
|
||||
|
||||
clean: sdcc-clean gbdk-support-clean gbdk-lib-clean
|
||||
clean: maccer-clean gbdk-support-clean gbdk-lib-clean
|
||||
|
||||
distclean: clean build-dir-clean
|
||||
|
||||
@@ -92,9 +95,9 @@ src: clean
|
||||
tar czf gbdk-$(VER).tar.gz gbdk
|
||||
|
||||
# Base rules
|
||||
gbdk-build: sdcc-build gbdk-support-build gbdk-lib-build
|
||||
gbdk-build: maccer-build gbdk-support-build gbdk-lib-build
|
||||
|
||||
gbdk-install: sdcc-install gbdk-support-install gbdk-lib-install
|
||||
gbdk-install: gbdk-support-install gbdk-lib-install
|
||||
|
||||
# Directories
|
||||
build-bin-dir:
|
||||
@@ -179,6 +182,13 @@ gbdk-lib-examples-makefile:
|
||||
$(MAKE) -C $(BUILDDIR)/examples/gb make.bat
|
||||
unix2dos $(BUILDDIR)/examples/gb/make.bat
|
||||
|
||||
# Rules for maccer
|
||||
maccer-build:
|
||||
$(MAKE) -C $(MACCERDIR)
|
||||
|
||||
maccer-clean:
|
||||
$(MAKE) -C $(MACCERDIR) clean
|
||||
|
||||
# Final binary
|
||||
binary: binary-tidyup
|
||||
ifeq ($(ARCHIVETYPE),zip)
|
||||
|
||||
@@ -8,29 +8,29 @@ MODEL = small
|
||||
endif
|
||||
|
||||
ifndef PORTS
|
||||
PORTS = gbz80 z80
|
||||
PORTS = gbz80
|
||||
endif
|
||||
ifndef PLATFORMS
|
||||
PLATFORMS = gb consolez80 rrgb
|
||||
PLATFORMS = gb
|
||||
endif
|
||||
|
||||
ifndef SDCCLIB
|
||||
SDCCLIB = /home/michaelh/projects/sdcc
|
||||
SDCCLIB = $(ZGB_PATH)/../env/SDCC
|
||||
endif
|
||||
|
||||
SCC = $(SDCCLIB)/bin/sdcc
|
||||
GBCC = $(SDCCLIB)/bin/lcc
|
||||
|
||||
AS_Z80 = $(SDCCLIB)/bin/as-z80
|
||||
AS_Z80 = $(SDCCLIB)/bin/sdasz80
|
||||
ifeq ($(RGBDS),1)
|
||||
AS_GBZ80 = rgbasm
|
||||
else
|
||||
AS_GBZ80 = $(SDCCLIB)/bin/as-gbz80
|
||||
AS_GBZ80 = $(SDCCLIB)/bin/sdasgb
|
||||
endif
|
||||
|
||||
CLEANSPEC = *.o *.cdb *.sym *.lst *~ *.asm
|
||||
|
||||
CFLAGS = -I$(TOPDIR)/include --model-$(MODEL)
|
||||
CFLAGS = -I$(TOPDIR)/include -DSDCC_z80 -D__gbz80
|
||||
CFLAGS += -m$(PORT) -DGBDK=1
|
||||
CC = $(SCC)
|
||||
BUILD = $(TOPDIR)/build/$(MODEL)/$(ASM)/$(THIS)
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#error gbz80 only.
|
||||
#endif
|
||||
|
||||
#define NONBANKED nonbanked
|
||||
#define BANKED banked
|
||||
#define NONBANKED
|
||||
#define BANKED
|
||||
|
||||
/** Signed eight bit.
|
||||
*/
|
||||
|
||||
@@ -508,7 +508,7 @@ _mululong (unsigned long a, unsigned long b) // in future: _mullong
|
||||
|
||||
t.i.hi = bcast(a)->b.b0 * bcast(b)->b.b2; // A
|
||||
t.i.lo = bcast(a)->b.b0 * bcast(b)->b.b0; // A
|
||||
_asm ;johan _endasm;
|
||||
__asm ;johan __endasm;
|
||||
t.b.b3 += bcast(a)->b.b3 *
|
||||
bcast(b)->b.b0; // G
|
||||
t.b.b3 += bcast(a)->b.b2 *
|
||||
|
||||
@@ -4,8 +4,7 @@ $(LIB): pre $(OBJ)
|
||||
pre: set-model build-dir
|
||||
|
||||
$(BUILD)/%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
mv `basename $< .c`.o $@
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(BUILD)/%.o: %.s
|
||||
$(AS) -plosgff $@ $<
|
||||
|
||||
Reference in New Issue
Block a user