From b969705650dce7f1ecba12ac88a1b71352dd7f54 Mon Sep 17 00:00:00 2001 From: Zorchenhimer Date: Tue, 28 Feb 2023 20:28:17 -0500 Subject: [PATCH] Update build to make building easier - Add go-nes as a submodule. This adds Go as a build requirement but removes the need to aquire, build, and configure it separately - Remove the ca65 & ld65 customizations so compiling will work with a release build without issue. - Don't remove bitmap files with the standard clean recipe. This removes the need for aesprite to build from a "clean" directory. - Updated README to reflect changes. --- .gitmodules | 3 +++ Makefile | 20 +++++++++++++------- README.md | 14 +++++++++++--- go-nes | 1 + 4 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .gitmodules create mode 160000 go-nes diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..918efe4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "go-nes"] + path = go-nes + url = https://github.com/zorchenhimer/go-nes.git diff --git a/Makefile b/Makefile index 853ec15..570f01d 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,18 @@ -export PATH := ../../go-nes/bin:/c/Program Files/Aseprite:../../tools/cc65/bin:$(PATH) +#export PATH := ../../go-nes/bin:/c/Program Files/Aseprite:../../tools/cc65/bin:$(PATH) .PHONY: all clean NAME = platforming NESCFG = nes_000.cfg -CAFLAGS = -g -t nes --color-messages -LDFLAGS = -C $(NESCFG) --dbgfile bin/$(NAME).dbg -m bin/$(NAME).map --color-messages +CAFLAGS = -g -t nes +LDFLAGS = -C $(NESCFG) --dbgfile bin/$(NAME).dbg -m bin/$(NAME).map +CHRUTIL = go-nes/bin/chrutil SOURCES = main.asm \ map-data.asm \ tiles.chr -all: bin/ bin/$(NAME).nes +all: $(CHRUTIL) bin/ bin/$(NAME).nes bin/: mkdir -p bin @@ -23,11 +24,16 @@ bin/$(NAME).nes: bin/$(NAME).o ld65 $(LDFLAGS) -o $@ $^ clean: - -rm -rf bin/* - -rm -rf *.chr *.bmp + -rm bin/* *.chr + +cleanall: clean + -rm *.bmp go-nes/bin/* tiles.chr: tiles.bmp - chrutil -o $@ $< + $(CHRUTIL) -o $@ $< tiles.bmp: tiles.aseprite aseprite -b $< --save-as $@ + +$(CHRUTIL): + $(MAKE) -C go-nes bin/chrutil diff --git a/README.md b/README.md index 444fd5b..34e526c 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,19 @@ This is a simple platforming physics demo for the NES in 6502 assembly. -## Build Requirements +## Building + +Building requires the following software installed: - GNU Make -- ca65 and ld65 -- chrutil +- [cc65 compiler suite](https://github.com/cc65/cc65) +- Go +- Aesprite (optional) + +To build: + + $ git clone https://github.com/zorchenhimer/nes-platforming.git + $ cd nes-platforming && make ## License diff --git a/go-nes b/go-nes new file mode 160000 index 0000000..f96269d --- /dev/null +++ b/go-nes @@ -0,0 +1 @@ +Subproject commit f96269d122c60ed595a45c76066eb0e82b3aa53b