A dungeon delver roguelike using Pathfinder 2nd edition rules
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Adding makefile

+64 -58
+63
gb/Makefile
··· 1 + .SUFFIXES: # Suppress a lot of useless default rules, which also provides a nice speedup. 2 + 3 + # Recursive `wildcard` function. 4 + rwildcard = $(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d)) 5 + 6 + # Program contsants. 7 + RM_RF := rm -rf 8 + MKDIR_P := mkdir -p 9 + ifeq ($(strip $(shell which rm)),) 10 + # Windows *really* tries its hardest to be Special! 11 + RM_RF := -rmdir /s /q 12 + MKDIR_P := -mkdir 13 + endif 14 + 15 + RGBDS ?= 16 + ASM := $(RGBDS)rgbasm 17 + LINK := $(RGBDS)rgblink 18 + FIX := $(RGBDS)rgbfix 19 + GFX := $(RGBDS)rgbgfx 20 + 21 + ROM = bin/$(ROMNAME).$(ROMEXT) 22 + 23 + # Argument constants 24 + INCDIRS = src/ include/ 25 + WARNINGS = all extra 26 + ASMFLAGS = -p $(PADVALUE) $(addprefix -I,$(INCDIRS)) $(addprefix -W,$(WARNINGS)) 27 + LINKFLAGS = -p $(PADVALUE) 28 + FIXFLAGS = -p $(PADVALUE) -i "$(GAMEID)" -k "$(LICENSEE)" -l $(OLDLIC) -m $(MBC) -n $(VERSION) -r $(SRAMSIZE) -t $(TITLE) 29 + 30 + SRCS = $(call rwildcard,src,*.asm) 31 + 32 + include project.mk 33 + 34 + all: $(ROM) 35 + .PHONY: all 36 + 37 + clean: 38 + $(RM_RF) bin obj assets 39 + .PHONY: clean 40 + 41 + rebuild: 42 + $(MAKE) clean 43 + $(MAKE) all 44 + .PHONY: rebuild 45 + 46 + VPATH := src 47 + 48 + bin/%.$(ROMEXT): $(patsubst src/%.asm,obj/%.o,$(SRCS)) 49 + @$(MKDIR_P) "$(@D)" 50 + $(ASM) $(ASMFLAGS) -o obj/build_date.o src/assets/build_date.asm 51 + $(LINK) $(LINKFLAGS) -m bin/$*.map -n bin/$*.sym -o $@ $^ \ 52 + && $(FIX) -v $(FIXFLAGS) $@ 53 + 54 + obj/%.mk: src/%.asm 55 + @$(MKDIR_P) "$(@D)" 56 + $(ASM) $(ASMFLAGS) -M $@ -MG -MP -MQ $(@:.mk=.o) -MQ $@ -o $(@:.mk=.o) $< 57 + 58 + obj/%.o: obj/%.mk 59 + @touch $@ 60 + 61 + ifeq ($(filter clean,$(MAKECMDGOALS)),) 62 + include $(patsubst src/%.asm,obj/%.mk,$(SRCS)) 63 + endif
+1 -58
gb/project.mk
··· 1 - # This file contains project-specific configuration. 2 - # You can override variables set in the Makefile here. 3 - 4 - 5 - # Value that the ROM will be filled with. 6 1 PADVALUE := 0xFF 7 - 8 - ## Header constants (passed to RGBFIX). 9 - 10 - # ROM version (typically starting at 0 and incremented for each published version). 11 2 VERSION := 0 12 - 13 - # 4-ASCII letter game ID. 14 3 GAMEID := DNGR 15 - 16 - # Game title, up to 11 ASCII chars. 17 4 TITLE := Dungeoner 18 - 19 - # New licensee, 2 ASCII chars. 20 - # Homebrew games FTW!. 21 5 LICENSEE := HB 22 - # Old licensee, please set to 0x33 (required to get SGB compatibility). 23 6 OLDLIC := 0x33 24 - 25 - # MBC type, tells which hardware is in the cart. 26 - # You can get a list of valid values by running `rgbfix -m help`. 27 - # See https://gbdev.io/pandocs/MBCs for more information, or consult any copy of Pan Docs. 28 - # If using no MBC, consider enabling `-t` below. 29 7 MBC := 0x00 30 - 31 - # ROM size is set automatically by RGBFIX. 32 - 33 - # Size of the on-board SRAM; MBC type should indicate the presence of RAM. 34 - # See https://gbdev.io/pandocs/The_Cartridge_Header#0149--ram-size or consult any copy of Pan Docs. 35 - # Set this to 0 when using MBC2's built-in SRAM. 36 8 SRAMSIZE := 0x00 37 - 38 - # ROM name. 39 9 ROMNAME := dungeoner 40 - ROMEXT := gb 41 - 42 - 43 - # Compilation parameters, uncomment to apply, comment to cancel. 44 - # "Sensible defaults" are included. 45 - # Please refer to RGBDS' documentation. 46 - # For example, offline: `man 1 rgbasm`; online: https://rgbds.gbdev.io/docs/rgbasm.1 47 - 48 - # Export all labels. 49 - # This means they must all have unique names, but they will all show up in the .sym and .map files. 50 - # ASFLAGS += -E 51 - 52 - # Game Boy Color compatible. 53 - # FIXFLAGS += -c 54 - # Game Boy Color required. 55 - # FIXFLAGS += -C 56 - 57 - # Super Game Boy compatible. 58 - # FIXFLAGS += -s 59 - 60 - # Game Boy mode. 61 - # LDFLAGS += -d 62 - 63 - # No banked WRAM mode. 64 - # LDFLAGS += -w 65 - 66 - # 32k mode. 67 - # LDFLAGS += -t 10 + ROMEXT := gb