29 lines
597 B
Makefile
29 lines
597 B
Makefile
|
ROM = ../rom.bin
|
||
|
MAIN = main.asm6502
|
||
|
|
||
|
BUILD_DIR = .build
|
||
|
|
||
|
SRC_DIRS = programs system
|
||
|
|
||
|
# VASM = ~/6502/vasm6502
|
||
|
ASM = ca65
|
||
|
ASMFLAGS = --cpu 65C02 $(foreach srcdir, $(SRC_DIRS), -I $(srcdir))
|
||
|
ASMDEPFLAGS = --create-dep .dependencies
|
||
|
|
||
|
LD = ld65
|
||
|
LDFLAGS = -C linker.conf
|
||
|
|
||
|
# DEPENDS = $(shell $(VASM) -depend=make $(MAIN))
|
||
|
|
||
|
-include .dependencies
|
||
|
|
||
|
default: $(ROM)
|
||
|
$(ROM):
|
||
|
$(ASM) $(ASMFLAGS) $(ASMDEPFLAGS) $(MAIN) -o $@
|
||
|
|
||
|
.PHONY = test
|
||
|
test:
|
||
|
# $(VASM) -dotdir -opt-branch -wdc02 -chklabels test.asm6502
|
||
|
$(ASM) $(ASMFLAGS) test.asm6502 -o test.o
|
||
|
$(LD) $(LDFLAGS) test.o -o test.bin
|