-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (31 loc) · 846 Bytes
/
Makefile
File metadata and controls
46 lines (31 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
CA=ca65
LD=ld65
PY=python3
CFLAGS65=-g
IDIR=inc
ODIR=obj
LDIR=lib
SDIR=src
title=spellbind
objlist = nrom init main bg player pads ppuclear
.PHONY: run clean
EMU=java -jar ~/Nintaco/Nintaco.jar
$(ODIR)/%.o: $(SDIR)/%.s $(IDIR)/nes.inc $(IDIR)/global.inc
$(CA) $(CFLAGS65) $< -o $@
# For generated source files
$(ODIR)/%.o: $(ODIR)/%.s
$(CA) $(CFLAGS65) $< -o $@
objlistntsc = $(foreach o,$(objlist),$(ODIR)/$(o).o)
map.txt $(title).nes: nrom256.cfg $(objlistntsc)
$(LD) -o $(title).nes -m map.txt -C $^
$(ODIR)/main.o: $(ODIR)/background.chr $(ODIR)/sprite.chr
$(title).chr: $(ODIR)/background.chr $(ODIR)/sprite.chr
cat $^ > $@
$(ODIR)/%.chr: $(IDIR)/%.png
$(PY) tools/pilbmp2nes.py $< $@
$(ODIR)/%16.chr: $(IDIR)/%.png
$(PY) tools/pilbmp2nes.py -H 16 $< $@
run:
$(EMU) $(title).nes
clean:
rm -f $(ODIR)/*.o $(ODIR)/*.chr