From 3147af0b985d2b46439f5f6b09867de071ab2d08 Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Sun, 25 Apr 2021 21:37:44 -0400 Subject: [PATCH 1/8] Bump to sgdk 1.62. Use original makelib.gen makefile to build lib (modified) --- sgdk/Makefile | 16 ++++++++------- sgdk/files/makefile.vars | 3 ++- sgdk/files/sgdk_v1.62.diff | 40 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 sgdk/files/sgdk_v1.62.diff diff --git a/sgdk/Makefile b/sgdk/Makefile index c5149eb..ac49469 100644 --- a/sgdk/Makefile +++ b/sgdk/Makefile @@ -4,7 +4,7 @@ GENGCC_BIN=$(GENDEV)/bin SGDKDIR=$(CURDIR)/SGDK SAMPLESDIR=$(SGDKDIR)/sample -SGDKVER=v1.51 +SGDKVER=v1.62 SGDKINSTALLDIR=$(GENDEV)/sgdk$(SGDKVER) all: tools $(SGDKDIR) $(SGDKDIR)/libmd.a @@ -28,17 +28,19 @@ SGDK: $(SGDKDIR) $(SGDKDIR): git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git -$(SGDKDIR)/libmd.a: prep - cp -rf ../tools/files/applib/lib $(SGDKDIR)/tools/appack - cd $(SGDKDIR) && ln -sf ../files/Makefile.sgdk_lib . - cd $(SGDKDIR) && $(MAKE) -f Makefile.sgdk_lib +$(SGDKDIR)/lib/libmd.a: prep + #cp -rf ../tools/files/applib/lib $(SGDKDIR)/tools/appack + #cd $(SGDKDIR) && ln -sf ../files/Makefile.sgdk_lib . + #cd $(SGDKDIR) && $(MAKE) -f Makefile.sgdk_lib + cd $(SGDKDIR) && $(MAKE) -f makelib.gen + $(SGDKINSTALLDIR): mkdir -p $@ rm -f $(GENDEV)/sgdk cd $(GENDEV) && ln -sf sgdk$(SGDKVER) sgdk -install: tools $(SGDKDIR)/libmd.a $(SGDKINSTALLDIR) +install: tools $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR) echo "Install" mkdir -p $(GENDEV)/sgdk/src mkdir -p $(GENDEV)/sgdk/inc @@ -50,7 +52,7 @@ install: tools $(SGDKDIR)/libmd.a $(SGDKINSTALLDIR) cp -r $(SGDKDIR)/src/boot $(GENDEV)/sgdk/src/. cp -r $(SGDKDIR)/res/* $(GENDEV)/sgdk/res/. cp $(GENDEV)/lib/libgcc.a $(GENDEV)/sgdk/lib/. - cp $(SGDKDIR)/libmd.a $(GENDEV)/sgdk/lib/. + cp $(SGDKDIR)/lib/libmd.a $(GENDEV)/sgdk/lib/. cp $(SGDKDIR)/makefile.gen $(GENDEV)/sgdk/mkfiles/. cp files/makefile.vars $(GENDEV)/sgdk/mkfiles/. cp $(SGDKDIR)/tools/sizebnd/src/sizebnd $(GENDEV)/bin/ diff --git a/sgdk/files/makefile.vars b/sgdk/files/makefile.vars index 65a3383..7a035f8 100644 --- a/sgdk/files/makefile.vars +++ b/sgdk/files/makefile.vars @@ -33,7 +33,8 @@ NM = nm #JAVA= java ECHO= echo OBJCPY = $(GENGCC_BIN)/m68k-elf-objcopy -ASMZ80 = $(GENBIN)/zasm +ASMZ80 = $(GENBIN)/sjasm +#ASMZ80 = $(GENBIN)/zasm #MACCER= $(BIN)/mac68k SIZEBND= $(GENGCC_BIN)/sizebnd BINTOS = $(GENBIN)/bintos diff --git a/sgdk/files/sgdk_v1.62.diff b/sgdk/files/sgdk_v1.62.diff new file mode 100644 index 0000000..25f9a8e --- /dev/null +++ b/sgdk/files/sgdk_v1.62.diff @@ -0,0 +1,40 @@ +diff --git a/makefile.gen b/makefile.gen +index 709b276..c637db1 100644 +--- a/makefile.gen ++++ b/makefile.gen +@@ -32,6 +32,8 @@ BINTOS := $(BIN)/bintos + RESCOMP := $(JAVA) -jar $(BIN)/rescomp.jar + MKDIR := $(BIN)/mkdir + ++include $(GENDEV)/sgdk/mkfiles/makefile.vars ++ + SRC_C = $(wildcard *.c) + SRC_C += $(wildcard $(SRC)/*.c) + SRC_C += $(wildcard $(SRC)/*/*.c) +diff --git a/makelib.gen b/makelib.gen +index 97318ff..9d333a3 100644 +--- a/makelib.gen ++++ b/makelib.gen +@@ -26,6 +26,8 @@ BINTOS := $(BIN)/bintos + RESCOMP := $(JAVA) -jar $(BIN)/rescomp.jar + MKDIR := $(BIN)/mkdir + ++include ../files/makefile.vars ++ + SRC_LIB_C := $(wildcard $(SRC_LIB)/*.c) + SRC_LIB_S := $(wildcard $(SRC_LIB)/*.s) + SRC_LIB_S80 := $(wildcard $(SRC_LIB)/*.s80) +@@ -101,11 +103,11 @@ cleanAsm: cleanasm + + + $(LIB)/libmd.a: cmd_ +- $(AR) rs $(LIB)/libmd.a --plugin=liblto_plugin-0.dll @cmd_ ++ $(AR) rs $(LIB)/libmd.a @cmd_ + $(RM) cmd_ + + $(LIB)/libmd_debug.a: cmd_ +- $(AR) rs $(LIB)/libmd_debug.a --plugin=liblto_plugin-0.dll @cmd_ ++ $(AR) rs $(LIB)/libmd_debug.a @cmd_ + $(RM) cmd_ + + cmd_ : $(OBJ_LIB) From cbbc66434df9dba68e41b9a3b756f54ac315e55b Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Thu, 29 Apr 2021 19:36:39 -0400 Subject: [PATCH 2/8] Fix CI --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d628102..64070ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,9 @@ jobs: command: make tools_build - run: name: build SGDK - command: make sgdk_build + command: | + export GENDEV=`pwd`/build + make sgdk_build - run: name: build samples command: | From d8f551542dc125787c9d90aab50fa7c23659efd4 Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Sun, 2 May 2021 14:08:25 -0400 Subject: [PATCH 3/8] Update how we build SGDK to be compatible with 1.62 changes. --- Makefile | 13 ++- sgdk/Makefile | 39 +++++--- sgdk/files/sgdk.ld | 116 ---------------------- sgdk/files/sgdk_v1.62.diff | 40 -------- sgdk/mkfiles/Makefile.rom | 52 ++++++++++ sgdk/{files => mkfiles}/Makefile.sgdk_lib | 17 ++-- sgdk/{files => mkfiles}/Makefile.xgmtool | 0 sgdk/{files => mkfiles}/makefile.vars | 1 + sgdk/{files => patches}/rescomp.diff | 0 sgdk/{files => patches}/sgdk_1.34.diff | 0 sgdk/{files => patches}/sgdk_v1.40.diff | 0 sgdk/{files => patches}/sgdk_v1.41.diff | 0 sgdk/{files => patches}/sgdk_v1.51.diff | 0 sgdk/patches/sgdk_v1.62.diff | 0 sgdk/{files => patches}/z80_drvrs.diff | 0 15 files changed, 91 insertions(+), 187 deletions(-) delete mode 100644 sgdk/files/sgdk.ld delete mode 100644 sgdk/files/sgdk_v1.62.diff create mode 100644 sgdk/mkfiles/Makefile.rom rename sgdk/{files => mkfiles}/Makefile.sgdk_lib (80%) rename sgdk/{files => mkfiles}/Makefile.xgmtool (100%) rename sgdk/{files => mkfiles}/makefile.vars (98%) rename sgdk/{files => patches}/rescomp.diff (100%) rename sgdk/{files => patches}/sgdk_1.34.diff (100%) rename sgdk/{files => patches}/sgdk_v1.40.diff (100%) rename sgdk/{files => patches}/sgdk_v1.41.diff (100%) rename sgdk/{files => patches}/sgdk_v1.51.diff (100%) create mode 100644 sgdk/patches/sgdk_v1.62.diff rename sgdk/{files => patches}/z80_drvrs.diff (100%) diff --git a/Makefile b/Makefile index 324be8f..a7112ae 100644 --- a/Makefile +++ b/Makefile @@ -44,9 +44,6 @@ tools_build: tools_clean: cd tools && $(MAKE) tools_clean -sgdk_samples: - cd sgdk && $(MAKE) sample_clean samples - $(GENDEV): if [ -w /opt ]; then \ mkdir -p $(GENDEV); \ @@ -55,7 +52,7 @@ $(GENDEV): $(SUDO) chown $(ORIG_USER):$(ORIG_USER) $@; \ fi -install: $(GENDEV) +install: $(GENDEV) sgdk_install echo "export GENDEV=$(GENDEV)" > ~/.gendev echo "export PATH=\$$GENDEV/bin:\$$PATH" >> ~/.gendev #$(SUDO) chmod 777 $@ @@ -82,11 +79,17 @@ dist/gendev_$(VER)_all.deb: pkg_build cd dist && dpkg-deb -Zxz -z9 --build $(TOPDIR)/pkg_build . sgdk_build: - cd sgdk && GENDEV=$(BUILDDIR) $(MAKE) install + cd sgdk && GENDEV=$(BUILDDIR) $(MAKE) + +sgdk_install: $(GENDEV) + cd sgdk && $(MAKE) install sgdk_clean: - cd sgdk && $(MAKE) clean +sgdk_samples: + cd sgdk && $(MAKE) sample_clean samples + clean: tools_clean toolchain_clean sgdk_clean -rm -rf $(BUILDDIR) -rm -rf pkg_build diff --git a/sgdk/Makefile b/sgdk/Makefile index ac49469..41c715a 100644 --- a/sgdk/Makefile +++ b/sgdk/Makefile @@ -1,13 +1,14 @@ GENDEV?=/opt/gendev/ GENBIN=$(GENDEV)/bin GENGCC_BIN=$(GENDEV)/bin -SGDKDIR=$(CURDIR)/SGDK +BUILDDIR=$(CURDIR)/../build +SGDKDIR?=$(BUILDDIR)/sgdk SAMPLESDIR=$(SGDKDIR)/sample SGDKVER=v1.62 SGDKINSTALLDIR=$(GENDEV)/sgdk$(SGDKVER) -all: tools $(SGDKDIR) $(SGDKDIR)/libmd.a +all: tools $(SGDKDIR) $(SGDKDIR)/lib/libmd.a tools: $(SGDKDIR) cd $(SGDKDIR)/tools/bintos/src && \ @@ -15,25 +16,31 @@ tools: $(SGDKDIR) cd $(SGDKDIR)/tools/sizebnd/src && \ gcc -o sizebnd sizebnd.c && cp sizebnd $(GENDEV)/bin/. cd $(SGDKDIR)/tools/xgmtool && \ - $(MAKE) -f ../../../files/Makefile.xgmtool && cp out/xgmtool $(GENDEV)/bin/. + $(MAKE) -f $(CURDIR)/mkfiles/Makefile.xgmtool && cp out/xgmtool $(GENDEV)/bin/. cp $(SGDKDIR)/bin/*.jar $(GENDEV)/bin/. patch: $(SGDKDIR) - cd $(SGDKDIR) && git diff . > ../files/sgdk_$(SGDKVER).diff + cd $(SGDKDIR) && git diff . > $(CURDIR)/patches/sgdk_$(SGDKVER).diff prep: $(SGDKDIR) - cd $(SGDKDIR) && patch -u -p1 -l < ../files/sgdk_$(SGDKVER).diff + cd $(SGDKDIR) && patch -u -p1 -l < $(CURDIR)/patches/sgdk_$(SGDKVER).diff SGDK: $(SGDKDIR) $(SGDKDIR): - git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git + cd $(BUILDDIR) && git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git sgdk + cd $(SGDKDIR) && patch -u -p1 -l < $(CURDIR)/patches/sgdk_$(SGDKVER).diff -$(SGDKDIR)/lib/libmd.a: prep - #cp -rf ../tools/files/applib/lib $(SGDKDIR)/tools/appack - #cd $(SGDKDIR) && ln -sf ../files/Makefile.sgdk_lib . - #cd $(SGDKDIR) && $(MAKE) -f Makefile.sgdk_lib - cd $(SGDKDIR) && $(MAKE) -f makelib.gen - + +$(SGDKDIR)/mkfiles: $(SGDKDIR) + mkdir -p $(SGDKDIR)/mkfiles + cp -f $(CURDIR)/mkfiles/makefile.vars $@/. + cp -f $(CURDIR)/mkfiles/Makefile.sgdk_lib $@/. + cp -f $(CURDIR)/mkfiles/Makefile.rom $@/. + +$(SGDKDIR)/lib/libmd.a: $(SGDKDIR) $(SGDKDIR)/mkfiles + #cd $(SGDKDIR) && GENDEV=$(BUILDDIR) $(MAKE) -f makelib.gen + cd $(SGDKDIR) && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.sgdk_lib + @echo "Done building sgdk library" $(SGDKINSTALLDIR): mkdir -p $@ @@ -54,7 +61,7 @@ install: tools $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR) cp $(GENDEV)/lib/libgcc.a $(GENDEV)/sgdk/lib/. cp $(SGDKDIR)/lib/libmd.a $(GENDEV)/sgdk/lib/. cp $(SGDKDIR)/makefile.gen $(GENDEV)/sgdk/mkfiles/. - cp files/makefile.vars $(GENDEV)/sgdk/mkfiles/. + cp mkfiles/makefile.vars $(GENDEV)/sgdk/mkfiles/. cp $(SGDKDIR)/tools/sizebnd/src/sizebnd $(GENDEV)/bin/ SAMPLES=$(wildcard $(SAMPLESDIR)/*/out) @@ -66,14 +73,14 @@ sample_clean: $(CLEANSAMPLES) @echo "Done cleaning samples" $(CLEANSAMPLES): - cd $@/.. && $(MAKE) -f $(SGDKDIR)/makefile.gen clean + cd $@/.. && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.rom clean samples: $(SAMPLEROMS) @echo "All samples built" -$(SAMPLEDIR)/%/out/rom.bin: +$(SAMPLESDIR)/%/out/rom.bin: echo "ROM $@" - cd $@/../../ && $(MAKE) -f $(GENDEV)/sgdk/mkfiles/makefile.gen + cd $@/../../ && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.rom clean: echo "Clean" diff --git a/sgdk/files/sgdk.ld b/sgdk/files/sgdk.ld deleted file mode 100644 index 13c81f8..0000000 --- a/sgdk/files/sgdk.ld +++ /dev/null @@ -1,116 +0,0 @@ -OUTPUT_ARCH(m68k) -SEARCH_DIR(.) -/*GROUP(-lbcc -lc -lgcc)*/ -__DYNAMIC = 0; - -/* - * Setup the memory map of the SEGA Genesis. - * stack grows down from high memory. - * - * The memory map look like this: - * +--------------------+ <- low memory - * | .text | - * | _etext | - * | ctor list | the ctor and dtor lists are for - * | dtor list | C++ support - * +--------------------+ - * . . - * . . - * . . - * +--------------------+ <- 0x00FF0000 - * | .data | initialized data goes here - * | _data | - * | _edata | - * +--------------------+ - * | .bss | - * | _bstart | start of bss, cleared by crt0 - * | _bend | start of heap, used by sbrk() - * +--------------------+ - * . . - * . . - * . . - * | __stack | top of stack - * +--------------------+ <- 0x01000000 - */ -MEMORY -{ - rom : ORIGIN = 0x00000000, LENGTH = 0x00400000 - ram : ORIGIN = 0x00FF0000, LENGTH = 0x00010000 -} - -/* - * allocate the stack to be at the top of memory, since the stack - * grows down - */ - -PROVIDE (__stack = 0x01000000); - - -SECTIONS -{ - .text 0x00000000: - { - *(.text .text.*) - . = ALIGN(0x4); - __CTOR_LIST__ = .; - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) - *(.ctors) - LONG(0) - __CTOR_END__ = .; - __DTOR_LIST__ = .; - LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) - *(.dtors) - LONG(0) - __DTOR_END__ = .; - *(.rodata .rodata.*) - *(.gcc_except_table .gcc_except_table.*) - - . = ALIGN(0x4); - __INIT_SECTION__ = . ; - *(.init) - SHORT (0x4E75) /* rts */ - - __FINI_SECTION__ = . ; - *(.fini) - SHORT (0x4E75) /* rts */ - - _etext = .; - *(.lit) - } > rom - _stext = SIZEOF (.text); - - .data 0xFF0000 : - AT ( ADDR (.text) + SIZEOF (.text) ) - { - *(.got.plt) *(.got) - *(.shdata) - *(.data .data.*) - _edata = .; - } > ram - _sdata = SIZEOF (.data); - - .bss 0xFF0000 + SIZEOF (.data) : - { - _start = . ; - *(.shbss) - *(.bss .bss.*) - *(COMMON) - _bend = . ; - end = . ; - } > ram - - .stab 0 (NOLOAD) : - { - *(.stab) - } - - .stabstr 0 (NOLOAD) : - { - *(.stabstr) - } - - .eh_frame 0 (NOLOAD) : - { - *(.eh_frame) - } -} diff --git a/sgdk/files/sgdk_v1.62.diff b/sgdk/files/sgdk_v1.62.diff deleted file mode 100644 index 25f9a8e..0000000 --- a/sgdk/files/sgdk_v1.62.diff +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/makefile.gen b/makefile.gen -index 709b276..c637db1 100644 ---- a/makefile.gen -+++ b/makefile.gen -@@ -32,6 +32,8 @@ BINTOS := $(BIN)/bintos - RESCOMP := $(JAVA) -jar $(BIN)/rescomp.jar - MKDIR := $(BIN)/mkdir - -+include $(GENDEV)/sgdk/mkfiles/makefile.vars -+ - SRC_C = $(wildcard *.c) - SRC_C += $(wildcard $(SRC)/*.c) - SRC_C += $(wildcard $(SRC)/*/*.c) -diff --git a/makelib.gen b/makelib.gen -index 97318ff..9d333a3 100644 ---- a/makelib.gen -+++ b/makelib.gen -@@ -26,6 +26,8 @@ BINTOS := $(BIN)/bintos - RESCOMP := $(JAVA) -jar $(BIN)/rescomp.jar - MKDIR := $(BIN)/mkdir - -+include ../files/makefile.vars -+ - SRC_LIB_C := $(wildcard $(SRC_LIB)/*.c) - SRC_LIB_S := $(wildcard $(SRC_LIB)/*.s) - SRC_LIB_S80 := $(wildcard $(SRC_LIB)/*.s80) -@@ -101,11 +103,11 @@ cleanAsm: cleanasm - - - $(LIB)/libmd.a: cmd_ -- $(AR) rs $(LIB)/libmd.a --plugin=liblto_plugin-0.dll @cmd_ -+ $(AR) rs $(LIB)/libmd.a @cmd_ - $(RM) cmd_ - - $(LIB)/libmd_debug.a: cmd_ -- $(AR) rs $(LIB)/libmd_debug.a --plugin=liblto_plugin-0.dll @cmd_ -+ $(AR) rs $(LIB)/libmd_debug.a @cmd_ - $(RM) cmd_ - - cmd_ : $(OBJ_LIB) diff --git a/sgdk/mkfiles/Makefile.rom b/sgdk/mkfiles/Makefile.rom new file mode 100644 index 0000000..c244732 --- /dev/null +++ b/sgdk/mkfiles/Makefile.rom @@ -0,0 +1,52 @@ +# +# Use this Makefile for most SGDK projects +# + +GENDEV?=/opt/gendev +SGDKDIR?=$(GENDEV)/sgdk + +include $(SGDKDIR)/makefile.gen + +############################################################################### +# Gendev specific vars +PATH := $(GENDEV)/bin:$(PATH) +GENGCC_BIN= $(GENDEV)/bin +GENBIN= $(GENDEV)/bin +BIN= $(GENDEV)/bin + +GDK= $(GENDEV)/sgdk + +AS = $(GENGCC_BIN)/m68k-elf-as +AR = $(GENGCC_BIN)/m68k-elf-ar +RANLIB = $(GENGCC_BIN)/m68k-elf-ranlib +NM2WCH = nm2wch +MKISOFS = mkisofs + +############################################################################### +# SGDK overrid vars +LIB= $(GENDEV)/sgdk/lib + +LIBSRC= $(GENDEV)/sgdk/src +LIBRES= $(GENDEV)/sgdk/res +LIBINCLUDE= $(GENDEV)/sgdk/inc + +SRC= src +RES= res +INCLUDE= inc + +SHELL= sh +RM = rm -f +CP= cp +CC = $(GENGCC_BIN)/m68k-elf-gcc +LD = $(GENGCC_BIN)/m68k-elf-ld +NM = nm +#JAVA= java +ECHO= echo +OBJCPY = $(GENGCC_BIN)/m68k-elf-objcopy +ASMZ80 = $(GENBIN)/sjasm +#ASMZ80 = $(GENBIN)/zasm +#MACCER= $(BIN)/mac68k +SIZEBND= $(GENGCC_BIN)/sizebnd +BINTOS = $(GENBIN)/bintos +RESCOMP= $(JAVA) -jar $(GENBIN)/rescomp.jar +MKDIR= mkdir diff --git a/sgdk/files/Makefile.sgdk_lib b/sgdk/mkfiles/Makefile.sgdk_lib similarity index 80% rename from sgdk/files/Makefile.sgdk_lib rename to sgdk/mkfiles/Makefile.sgdk_lib index 031fec2..e553713 100644 --- a/sgdk/files/Makefile.sgdk_lib +++ b/sgdk/mkfiles/Makefile.sgdk_lib @@ -30,13 +30,7 @@ INCS = -Iinc -Ires FLAGS = $(OPTION) -m68000 -Wall -O1 -c -fomit-frame-pointer $(INCS) FLAGSZ80 = -isrc -iinc -all: appack $(libmd.a_OBJS) libmd.a - -appack: - echo -n "osBits="> tools/appack/makefile.vars - getconf LONG_BIT >> tools/appack/makefile.vars - cd tools/appack/ && make -f makefile.elf - cp tools/appack/appack bin/ +all: $(libmd.a_OBJS) libmd.a %.a: $(libmd.a_OBJS) $(RM) $@ @@ -53,10 +47,13 @@ appack: $(CC) $(FLAGS) -c $< -o $@ %.o: %.s - $(CC) $(FLAGS) -c $< -o $@ + $(CC) -x assembler-with-cpp -MMD $(FLAGS) -c $< -o $@ + +%.o: %.rs + $(CC) -x assembler-with-cpp $(FLAGS_LIB) -c $*.rs -o $@ -%.s: %.res - $(RESCOMP) $< $@ +%.rs: %.res + $(RESCOMP) $*.res $*.rs -dep $*.o clean: #$(RM) -f z80_drv1.c z80_drv2.c diff --git a/sgdk/files/Makefile.xgmtool b/sgdk/mkfiles/Makefile.xgmtool similarity index 100% rename from sgdk/files/Makefile.xgmtool rename to sgdk/mkfiles/Makefile.xgmtool diff --git a/sgdk/files/makefile.vars b/sgdk/mkfiles/makefile.vars similarity index 98% rename from sgdk/files/makefile.vars rename to sgdk/mkfiles/makefile.vars index 7a035f8..84ab181 100644 --- a/sgdk/files/makefile.vars +++ b/sgdk/mkfiles/makefile.vars @@ -3,6 +3,7 @@ PATH := $(GENDEV)/bin:$(PATH) GENGCC_BIN= $(GENDEV)/bin GENBIN= $(GENDEV)/bin +BIN= $(GENDEV)/bin GDK= $(GENDEV)/sgdk diff --git a/sgdk/files/rescomp.diff b/sgdk/patches/rescomp.diff similarity index 100% rename from sgdk/files/rescomp.diff rename to sgdk/patches/rescomp.diff diff --git a/sgdk/files/sgdk_1.34.diff b/sgdk/patches/sgdk_1.34.diff similarity index 100% rename from sgdk/files/sgdk_1.34.diff rename to sgdk/patches/sgdk_1.34.diff diff --git a/sgdk/files/sgdk_v1.40.diff b/sgdk/patches/sgdk_v1.40.diff similarity index 100% rename from sgdk/files/sgdk_v1.40.diff rename to sgdk/patches/sgdk_v1.40.diff diff --git a/sgdk/files/sgdk_v1.41.diff b/sgdk/patches/sgdk_v1.41.diff similarity index 100% rename from sgdk/files/sgdk_v1.41.diff rename to sgdk/patches/sgdk_v1.41.diff diff --git a/sgdk/files/sgdk_v1.51.diff b/sgdk/patches/sgdk_v1.51.diff similarity index 100% rename from sgdk/files/sgdk_v1.51.diff rename to sgdk/patches/sgdk_v1.51.diff diff --git a/sgdk/patches/sgdk_v1.62.diff b/sgdk/patches/sgdk_v1.62.diff new file mode 100644 index 0000000..e69de29 diff --git a/sgdk/files/z80_drvrs.diff b/sgdk/patches/z80_drvrs.diff similarity index 100% rename from sgdk/files/z80_drvrs.diff rename to sgdk/patches/z80_drvrs.diff From 0199a9c77450bc6bed6755b6fbb5702e3d8627e1 Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Sun, 2 May 2021 16:36:11 -0400 Subject: [PATCH 4/8] Use correct archive locations. --- sgdk/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sgdk/Makefile b/sgdk/Makefile index 41c715a..07baebb 100644 --- a/sgdk/Makefile +++ b/sgdk/Makefile @@ -29,6 +29,7 @@ SGDK: $(SGDKDIR) $(SGDKDIR): cd $(BUILDDIR) && git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git sgdk cd $(SGDKDIR) && patch -u -p1 -l < $(CURDIR)/patches/sgdk_$(SGDKVER).diff + rm -f $(SGDKDIR)/lib/*.a $(SGDKDIR)/mkfiles: $(SGDKDIR) @@ -38,8 +39,9 @@ $(SGDKDIR)/mkfiles: $(SGDKDIR) cp -f $(CURDIR)/mkfiles/Makefile.rom $@/. $(SGDKDIR)/lib/libmd.a: $(SGDKDIR) $(SGDKDIR)/mkfiles - #cd $(SGDKDIR) && GENDEV=$(BUILDDIR) $(MAKE) -f makelib.gen cd $(SGDKDIR) && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.sgdk_lib + cp $(BUILDDIR)/lib/libgcc.a $(SGDKDIR)/lib/libgcc.a + mv $(SGDKDIR)/libmd.a $(SGDKDIR)/lib/libmd.a @echo "Done building sgdk library" $(SGDKINSTALLDIR): From 1250be2d22f0adc2b6fa3678e8313b4e5698ce77 Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Sun, 2 May 2021 21:10:03 -0400 Subject: [PATCH 5/8] Redefine targets --- Dockerfile | 2 +- Makefile | 5 ++- sgdk/Makefile | 74 ++++++++++++++++++++++------------ sgdk/mkfiles/Makefile.rom | 10 ++--- sgdk/mkfiles/Makefile.sgdk_lib | 2 +- 5 files changed, 60 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index 487bf90..277b0b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,4 +42,4 @@ ENV PATH $GENDEV/bin:$PATH WORKDIR /src -ENTRYPOINT make -f $GENDEV/sgdk/mkfiles/makefile.gen +ENTRYPOINT make -f $GENDEV/sgdk/mkfiles/Makefile.rom diff --git a/Makefile b/Makefile index a7112ae..e9600ea 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ PATH := $(BUILDDIR)/bin:$(PATH) build: toolchain_build tools_build sgdk_build echo "Done" +docker_build: + docker build -t gendev . + $(BUILDDIR): mkdir -p $@ @@ -52,7 +55,7 @@ $(GENDEV): $(SUDO) chown $(ORIG_USER):$(ORIG_USER) $@; \ fi -install: $(GENDEV) sgdk_install +install: $(GENDEV) echo "export GENDEV=$(GENDEV)" > ~/.gendev echo "export PATH=\$$GENDEV/bin:\$$PATH" >> ~/.gendev #$(SUDO) chmod 777 $@ diff --git a/sgdk/Makefile b/sgdk/Makefile index 07baebb..41cc010 100644 --- a/sgdk/Makefile +++ b/sgdk/Makefile @@ -1,23 +1,42 @@ GENDEV?=/opt/gendev/ GENBIN=$(GENDEV)/bin GENGCC_BIN=$(GENDEV)/bin -BUILDDIR=$(CURDIR)/../build + + + +BUILDDIR?=$(CURDIR)/build SGDKDIR?=$(BUILDDIR)/sgdk + + + SAMPLESDIR=$(SGDKDIR)/sample SGDKVER=v1.62 + + SGDKINSTALLDIR=$(GENDEV)/sgdk$(SGDKVER) -all: tools $(SGDKDIR) $(SGDKDIR)/lib/libmd.a + + + +all: $(SGDKDIR) $(SGDKDIR)/lib/libmd.a tools tools: $(SGDKDIR) cd $(SGDKDIR)/tools/bintos/src && \ - gcc -o bintos bintos.c && cp bintos $(GENDEV)/bin/. + gcc -o bintos bintos.c + cd $(SGDKDIR)/tools/sizebnd/src && \ + gcc -o sizebnd sizebnd.c + cd $(SGDKDIR)/tools/xgmtool && \ + $(MAKE) -f $(CURDIR)/mkfiles/Makefile.xgmtool + +toolsinstall: $(SGDKINSTALLDIR) + cd $(SGDKDIR)/tools/bintos/src && \ + cp bintos $(SGDKINSTALLDIR)/bin/. cd $(SGDKDIR)/tools/sizebnd/src && \ - gcc -o sizebnd sizebnd.c && cp sizebnd $(GENDEV)/bin/. + cp sizebnd $(SGDKINSTALLDIR)/bin/. cd $(SGDKDIR)/tools/xgmtool && \ - $(MAKE) -f $(CURDIR)/mkfiles/Makefile.xgmtool && cp out/xgmtool $(GENDEV)/bin/. - cp $(SGDKDIR)/bin/*.jar $(GENDEV)/bin/. + cp out/xgmtool $(SGDKINSTALLDIR)/bin/. + cp $(SGDKDIR)/bin/*.jar $(SGDKINSTALLDIR)/bin/. patch: $(SGDKDIR) cd $(SGDKDIR) && git diff . > $(CURDIR)/patches/sgdk_$(SGDKVER).diff @@ -25,12 +44,15 @@ patch: $(SGDKDIR) prep: $(SGDKDIR) cd $(SGDKDIR) && patch -u -p1 -l < $(CURDIR)/patches/sgdk_$(SGDKVER).diff +$(BUILDDIR): + mkdir -p $@ + SGDK: $(SGDKDIR) -$(SGDKDIR): +$(SGDKDIR): $(BUILDDIR) cd $(BUILDDIR) && git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git sgdk cd $(SGDKDIR) && patch -u -p1 -l < $(CURDIR)/patches/sgdk_$(SGDKVER).diff rm -f $(SGDKDIR)/lib/*.a - + rm -f $(SGDKDIR)/bin/*.exe $(SGDKDIR)/mkfiles: $(SGDKDIR) mkdir -p $(SGDKDIR)/mkfiles @@ -40,7 +62,7 @@ $(SGDKDIR)/mkfiles: $(SGDKDIR) $(SGDKDIR)/lib/libmd.a: $(SGDKDIR) $(SGDKDIR)/mkfiles cd $(SGDKDIR) && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.sgdk_lib - cp $(BUILDDIR)/lib/libgcc.a $(SGDKDIR)/lib/libgcc.a + cp $(GENDEV)/lib/libgcc.a $(SGDKDIR)/lib/libgcc.a mv $(SGDKDIR)/libmd.a $(SGDKDIR)/lib/libmd.a @echo "Done building sgdk library" @@ -48,23 +70,24 @@ $(SGDKINSTALLDIR): mkdir -p $@ rm -f $(GENDEV)/sgdk cd $(GENDEV) && ln -sf sgdk$(SGDKVER) sgdk - -install: tools $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR) + mkdir -p $@/src + mkdir -p $@/bin + mkdir -p $@/inc + mkdir -p $@/res + mkdir -p $@/lib + mkdir -p $@/mkfiles + +install: toolsinstall $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR) echo "Install" - mkdir -p $(GENDEV)/sgdk/src - mkdir -p $(GENDEV)/sgdk/inc - mkdir -p $(GENDEV)/sgdk/lib - mkdir -p $(GENDEV)/sgdk/res - mkdir -p $(GENDEV)/sgdk/mkfiles - cp $(SGDKDIR)/md.ld $(GENDEV)/sgdk/. - cp $(SGDKDIR)/inc/* $(GENDEV)/sgdk/inc/. - cp -r $(SGDKDIR)/src/boot $(GENDEV)/sgdk/src/. - cp -r $(SGDKDIR)/res/* $(GENDEV)/sgdk/res/. - cp $(GENDEV)/lib/libgcc.a $(GENDEV)/sgdk/lib/. - cp $(SGDKDIR)/lib/libmd.a $(GENDEV)/sgdk/lib/. - cp $(SGDKDIR)/makefile.gen $(GENDEV)/sgdk/mkfiles/. - cp mkfiles/makefile.vars $(GENDEV)/sgdk/mkfiles/. - cp $(SGDKDIR)/tools/sizebnd/src/sizebnd $(GENDEV)/bin/ + cp $(SGDKDIR)/md.ld $(SGDKINSTALLDIR)/. + cp $(SGDKDIR)/inc/* $(SGDKINSTALLDIR)/inc/. + cp -r $(SGDKDIR)/src/boot $(SGDKINSTALLDIR)/src/. + cp -r $(SGDKDIR)/res/* $(SGDKINSTALLDIR)/res/. + cp $(GENDEV)/lib/libgcc.a $(SGDKINSTALLDIR)/lib/. + cp $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR)/lib/. + cp $(SGDKDIR)/makefile.gen $(SGDKINSTALLDIR)/mkfiles/. + cp $(SGDKDIR)/mkfiles/* $(SGDKINSTALLDIR)/mkfiles/. + cp $(SGDKDIR)/tools/sizebnd/src/sizebnd $(SGDKINSTALLDIR)/bin/ SAMPLES=$(wildcard $(SAMPLESDIR)/*/out) SAMPLEROMS=$(addsuffix /rom.bin,$(SAMPLES)) @@ -87,3 +110,4 @@ $(SAMPLESDIR)/%/out/rom.bin: clean: echo "Clean" -rm -rf $(SGDKDIR) + -rm -rf $(BUILDDIR) diff --git a/sgdk/mkfiles/Makefile.rom b/sgdk/mkfiles/Makefile.rom index c244732..6357e4a 100644 --- a/sgdk/mkfiles/Makefile.rom +++ b/sgdk/mkfiles/Makefile.rom @@ -14,7 +14,7 @@ GENGCC_BIN= $(GENDEV)/bin GENBIN= $(GENDEV)/bin BIN= $(GENDEV)/bin -GDK= $(GENDEV)/sgdk +GDK= $(SGDKDIR) AS = $(GENGCC_BIN)/m68k-elf-as AR = $(GENGCC_BIN)/m68k-elf-ar @@ -24,11 +24,11 @@ MKISOFS = mkisofs ############################################################################### # SGDK overrid vars -LIB= $(GENDEV)/sgdk/lib +LIB= $(SGDKDIR)/lib -LIBSRC= $(GENDEV)/sgdk/src -LIBRES= $(GENDEV)/sgdk/res -LIBINCLUDE= $(GENDEV)/sgdk/inc +LIBSRC= $(SGDKDIR)/src +LIBRES= $(SGDKDIR)/res +LIBINCLUDE= $(SGDKDIR)/inc SRC= src RES= res diff --git a/sgdk/mkfiles/Makefile.sgdk_lib b/sgdk/mkfiles/Makefile.sgdk_lib index e553713..2564e67 100644 --- a/sgdk/mkfiles/Makefile.sgdk_lib +++ b/sgdk/mkfiles/Makefile.sgdk_lib @@ -1,4 +1,4 @@ -GENDEV?=/opt/toolchains/gen/ +GENDEV?=/opt/gendev/ MAKE?=make GENGCC_BIN=$(GENDEV)/bin GENBIN=$(GENDEV)/bin From 6305877192c4ad617a05a6257f9375efd46e5e74 Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Sun, 16 May 2021 15:23:00 -0400 Subject: [PATCH 6/8] Streamline how we leverage SGDK makefiles. --- sgdk/Makefile | 44 ++++++++++++++++------------- sgdk/mkfiles/Makefile.rom | 51 ++++++---------------------------- sgdk/mkfiles/Makefile.sgdk_lib | 4 ++- 3 files changed, 35 insertions(+), 64 deletions(-) diff --git a/sgdk/Makefile b/sgdk/Makefile index 41cc010..aefb03a 100644 --- a/sgdk/Makefile +++ b/sgdk/Makefile @@ -1,35 +1,29 @@ + +# Locatin of gendev install GENDEV?=/opt/gendev/ GENBIN=$(GENDEV)/bin -GENGCC_BIN=$(GENDEV)/bin - - +# Location of build and source BUILDDIR?=$(CURDIR)/build -SGDKDIR?=$(BUILDDIR)/sgdk - - - +SGDKDIR=$(BUILDDIR)/sgdk SAMPLESDIR=$(SGDKDIR)/sample +# Version of SGDK to build SGDKVER=v1.62 - -SGDKINSTALLDIR=$(GENDEV)/sgdk$(SGDKVER) - - - +# SGDK install location +SGDKINSTALLDIR=$(GENDEV)/sgdk all: $(SGDKDIR) $(SGDKDIR)/lib/libmd.a tools -tools: $(SGDKDIR) +# Various tools needed to use SGDK +tools: $(SGDKDIR) $(SGDKINSTALLDIR) cd $(SGDKDIR)/tools/bintos/src && \ gcc -o bintos bintos.c cd $(SGDKDIR)/tools/sizebnd/src && \ gcc -o sizebnd sizebnd.c cd $(SGDKDIR)/tools/xgmtool && \ $(MAKE) -f $(CURDIR)/mkfiles/Makefile.xgmtool - -toolsinstall: $(SGDKINSTALLDIR) cd $(SGDKDIR)/tools/bintos/src && \ cp bintos $(SGDKINSTALLDIR)/bin/. cd $(SGDKDIR)/tools/sizebnd/src && \ @@ -38,15 +32,19 @@ toolsinstall: $(SGDKINSTALLDIR) cp out/xgmtool $(SGDKINSTALLDIR)/bin/. cp $(SGDKDIR)/bin/*.jar $(SGDKINSTALLDIR)/bin/. + +# Create a new patchfile based on the current SGDK checkout patch: $(SGDKDIR) cd $(SGDKDIR) && git diff . > $(CURDIR)/patches/sgdk_$(SGDKVER).diff +# Update an SGDK checkout with the current versions patchfile prep: $(SGDKDIR) cd $(SGDKDIR) && patch -u -p1 -l < $(CURDIR)/patches/sgdk_$(SGDKVER).diff $(BUILDDIR): mkdir -p $@ +# Checkout and prep SGDK for building SGDK: $(SGDKDIR) $(SGDKDIR): $(BUILDDIR) cd $(BUILDDIR) && git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git sgdk @@ -60,7 +58,7 @@ $(SGDKDIR)/mkfiles: $(SGDKDIR) cp -f $(CURDIR)/mkfiles/Makefile.sgdk_lib $@/. cp -f $(CURDIR)/mkfiles/Makefile.rom $@/. -$(SGDKDIR)/lib/libmd.a: $(SGDKDIR) $(SGDKDIR)/mkfiles +$(SGDKDIR)/lib/libmd.a: $(SGDKDIR) $(SGDKDIR)/mkfiles tools cd $(SGDKDIR) && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.sgdk_lib cp $(GENDEV)/lib/libgcc.a $(SGDKDIR)/lib/libgcc.a mv $(SGDKDIR)/libmd.a $(SGDKDIR)/lib/libmd.a @@ -77,17 +75,23 @@ $(SGDKINSTALLDIR): mkdir -p $@/lib mkdir -p $@/mkfiles -install: toolsinstall $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR) +install: $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR) echo "Install" cp $(SGDKDIR)/md.ld $(SGDKINSTALLDIR)/. cp $(SGDKDIR)/inc/* $(SGDKINSTALLDIR)/inc/. - cp -r $(SGDKDIR)/src/boot $(SGDKINSTALLDIR)/src/. + cp -r $(SGDKDIR)/src/* $(SGDKINSTALLDIR)/src/. cp -r $(SGDKDIR)/res/* $(SGDKINSTALLDIR)/res/. cp $(GENDEV)/lib/libgcc.a $(SGDKINSTALLDIR)/lib/. cp $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR)/lib/. cp $(SGDKDIR)/makefile.gen $(SGDKINSTALLDIR)/mkfiles/. cp $(SGDKDIR)/mkfiles/* $(SGDKINSTALLDIR)/mkfiles/. cp $(SGDKDIR)/tools/sizebnd/src/sizebnd $(SGDKINSTALLDIR)/bin/ + cd $(SGDKINSTALLDIR)/bin && ln -sf ../../bin/m68k-elf-gcc gcc + cd $(SGDKINSTALLDIR)/bin && ln -sf ../../bin/m68k-elf-nm nm + cd $(SGDKINSTALLDIR)/bin && ln -sf ../../bin/m68k-elf-ld ld + cd $(SGDKINSTALLDIR)/bin && ln -sf ../../bin/m68k-elf-objcopy objcopy + cd $(SGDKINSTALLDIR)/bin && ln -sf ../../bin/sjasm sjasm + SAMPLES=$(wildcard $(SAMPLESDIR)/*/out) SAMPLEROMS=$(addsuffix /rom.bin,$(SAMPLES)) @@ -98,14 +102,14 @@ sample_clean: $(CLEANSAMPLES) @echo "Done cleaning samples" $(CLEANSAMPLES): - cd $@/.. && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.rom clean + cd $@/.. && $(MAKE) -f $(CURDIR)/mkfiles/Makefile.rom clean samples: $(SAMPLEROMS) @echo "All samples built" $(SAMPLESDIR)/%/out/rom.bin: echo "ROM $@" - cd $@/../../ && SGDKDIR=$(SGDKDIR) $(MAKE) -f $(CURDIR)/mkfiles/Makefile.rom + cd $@/../../ && GENDEV=$(GENDEV) $(MAKE) -f $(SGDKINSTALLDIR)/mkfiles/Makefile.rom clean: echo "Clean" diff --git a/sgdk/mkfiles/Makefile.rom b/sgdk/mkfiles/Makefile.rom index 6357e4a..cba3a59 100644 --- a/sgdk/mkfiles/Makefile.rom +++ b/sgdk/mkfiles/Makefile.rom @@ -5,48 +5,13 @@ GENDEV?=/opt/gendev SGDKDIR?=$(GENDEV)/sgdk -include $(SGDKDIR)/makefile.gen +# Set GDK before including default SGDK makefile +GDK=$(SGDKDIR) -############################################################################### -# Gendev specific vars -PATH := $(GENDEV)/bin:$(PATH) -GENGCC_BIN= $(GENDEV)/bin -GENBIN= $(GENDEV)/bin -BIN= $(GENDEV)/bin +include $(SGDKDIR)/mkfiles/makefile.gen -GDK= $(SGDKDIR) - -AS = $(GENGCC_BIN)/m68k-elf-as -AR = $(GENGCC_BIN)/m68k-elf-ar -RANLIB = $(GENGCC_BIN)/m68k-elf-ranlib -NM2WCH = nm2wch -MKISOFS = mkisofs - -############################################################################### -# SGDK overrid vars -LIB= $(SGDKDIR)/lib - -LIBSRC= $(SGDKDIR)/src -LIBRES= $(SGDKDIR)/res -LIBINCLUDE= $(SGDKDIR)/inc - -SRC= src -RES= res -INCLUDE= inc - -SHELL= sh -RM = rm -f -CP= cp -CC = $(GENGCC_BIN)/m68k-elf-gcc -LD = $(GENGCC_BIN)/m68k-elf-ld -NM = nm -#JAVA= java -ECHO= echo -OBJCPY = $(GENGCC_BIN)/m68k-elf-objcopy -ASMZ80 = $(GENBIN)/sjasm -#ASMZ80 = $(GENBIN)/zasm -#MACCER= $(BIN)/mac68k -SIZEBND= $(GENGCC_BIN)/sizebnd -BINTOS = $(GENBIN)/bintos -RESCOMP= $(JAVA) -jar $(GENBIN)/rescomp.jar -MKDIR= mkdir +# Override shell variables +MKDIR=/bin/mkdir +RM=/bin/rm +CP=/bin/cp +SHELL=/bin/bash diff --git a/sgdk/mkfiles/Makefile.sgdk_lib b/sgdk/mkfiles/Makefile.sgdk_lib index 2564e67..2745694 100644 --- a/sgdk/mkfiles/Makefile.sgdk_lib +++ b/sgdk/mkfiles/Makefile.sgdk_lib @@ -2,6 +2,8 @@ GENDEV?=/opt/gendev/ MAKE?=make GENGCC_BIN=$(GENDEV)/bin GENBIN=$(GENDEV)/bin +SGDKBIN=$(GENDEV)/sgdk/bin + CC = $(GENGCC_BIN)/m68k-elf-gcc AR = $(GENGCC_BIN)/m68k-elf-ar @@ -9,7 +11,7 @@ RANLIB = $(GENGCC_BIN)/m68k-elf-ranlib OBJC = $(GENGCC_BIN)/m68k-elf-objcopy RM = rm -f ASMZ80 = $(GENBIN)/sjasm -BINTOS = $(GENBIN)/bintos +BINTOS = $(SGDKBIN)/bintos RESCOMP= java -jar ./bin/rescomp.jar OPTION= -Dnologo_ From 535e523c3aaf26df6d242f607cb03b0c2c157823 Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Sun, 16 May 2021 16:23:48 -0400 Subject: [PATCH 7/8] Install to versioned dir, initially --- sgdk/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgdk/Makefile b/sgdk/Makefile index aefb03a..380319b 100644 --- a/sgdk/Makefile +++ b/sgdk/Makefile @@ -12,7 +12,7 @@ SAMPLESDIR=$(SGDKDIR)/sample SGDKVER=v1.62 # SGDK install location -SGDKINSTALLDIR=$(GENDEV)/sgdk +SGDKINSTALLDIR=$(GENDEV)/sgdk$(SGDKVER) all: $(SGDKDIR) $(SGDKDIR)/lib/libmd.a tools @@ -79,7 +79,7 @@ install: $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR) echo "Install" cp $(SGDKDIR)/md.ld $(SGDKINSTALLDIR)/. cp $(SGDKDIR)/inc/* $(SGDKINSTALLDIR)/inc/. - cp -r $(SGDKDIR)/src/* $(SGDKINSTALLDIR)/src/. + cp -r $(SGDKDIR)/src/boot $(SGDKINSTALLDIR)/src/. cp -r $(SGDKDIR)/res/* $(SGDKINSTALLDIR)/res/. cp $(GENDEV)/lib/libgcc.a $(SGDKINSTALLDIR)/lib/. cp $(SGDKDIR)/lib/libmd.a $(SGDKINSTALLDIR)/lib/. From bc280a821cb451d41fdb65d7c6dbbfa768ae7629 Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Sat, 5 Jun 2021 13:41:58 -0400 Subject: [PATCH 8/8] Build and install sgdk before test --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 64070ac..67afbf9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,7 +25,7 @@ jobs: name: build SGDK command: | export GENDEV=`pwd`/build - make sgdk_build + make sgdk_build sgdk_install - run: name: build samples command: |