added makefile

This commit is contained in:
2021-12-01 11:02:07 +01:00
parent 9c0346bc61
commit b223361e54
3 changed files with 25 additions and 1 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,2 @@
Build Build
rom.sym *.sym

Binary file not shown.

24
Makefile Normal file
View File

@@ -0,0 +1,24 @@
TITLE = "Game of Life"
INCLUDE = -i Graphics -i Code
NAME = $(notdir $(CURDIR))
FILES = $(wildcard Code/*.asm)
OBJECTS = $(patsubst Code/%.asm,Build/%.o,$(FILES))
.PHONY: clean mrproper
Build/%.o: Code/%.asm
@echo Assembling $<
@rgbasm $(INCLUDE) -o $@ $<
$(NAME).gb: $(OBJECTS)
@echo Linking...
@rgblink -n $(NAME).sym -w -t -o $(NAME).gb -d $(OBJECTS)
@rgbfix -t $(TITLE) -v -p 0 $(NAME).gb
clean:
@rm -f $(OBJECTS)
@rm -f $(NAME).sym
mrproper: clean
@rm -f $(NAME).gb