Update Makefile

This commit is contained in:
Joshua Bell 2018-04-29 21:45:53 -07:00 committed by GitHub
parent e974c76ff7
commit f6e359cfb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,10 @@ YY = $(shell date "+%y")
DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY)
.PHONY: clean all
all: $(TARGETS)
all: $(OUTDIR) $(TARGETS)
$(OUTDIR):
mkdir -p $(OUTDIR)
HEADERS = $(wildcard *.inc)
@ -29,6 +32,8 @@ clean:
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
rm -f $(OUTDIR)/$(TARGETS)
$(OUTDIR)/%.o: %.s $(HEADERS)
$(CC65)/ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<