Skip to content

Commit

Permalink
Add rgbdscheck.asm
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcandth committed Jan 16, 2025
1 parent 126d744 commit daff281
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ clean:
# Remove generated files except for graphics.
.PHONY: tidy
tidy:
rm -rf $(ROM) $(CORRECTEDROM) $(ROMS:.gb=.sym) $(ROMS:.gb=.map) $(OBJS) $(BUILD)/shim.asm
rm -rf $(ROM) $(CORRECTEDROM) $(ROMS:.gb=.sym) $(ROMS:.gb=.map) $(OBJS) $(BUILD)/shim.asm rgbdscheck.o

# Visualize disassembly progress.
.PHONY: coverage
Expand All @@ -71,6 +71,9 @@ coverage: $(ROM:.gb=.map)

### Build products

rgbdscheck.o: rgbdscheck.asm
$(RGBASM) -o $@ $<

%.map: %.gb

$(CORRECTEDROM): %-correctheader.gb: %.gb
Expand All @@ -97,10 +100,10 @@ include slack/slack.mk

### Catch-all build target rules

$(BUILD)/%.o: $(BUILD)/%.asm | $$(dir $$@)
$(BUILD)/%.o: $(BUILD)/%.asm | $$(dir $$@) rgbdscheck.o
$(RGBASM) $(RGBASMFLAGS) $(OUTPUT_OPTION) $<

$(BUILD)/%.o: %.asm | $$(dir $$@)
$(BUILD)/%.o: %.asm | $$(dir $$@) rgbdscheck.o
$(RGBASM) $(RGBASMFLAGS) $(OUTPUT_OPTION) $<

$(BUILD)/%.d: %.asm | $$(dir $$@) $(SCAN_INCLUDES)
Expand Down
6 changes: 6 additions & 0 deletions rgbdscheck.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__)
fail "pokecrystal requires rgbds v0.7.0 or newer."
ENDC
IF __RGBDS_MAJOR__ == 0 && __RGBDS_MINOR__ < 7
fail "pokecrystal requires rgbds v0.7.0 or newer."
ENDC

0 comments on commit daff281

Please sign in to comment.