added makefile
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
||||
Build
|
||||
rom.sym
|
||||
*.sym
|
||||
|
||||
Binary file not shown.
24
Makefile
Normal file
24
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user