# --------------------------------------------------------------------------
# Generic rules
+.PHONY: all mostlyclean clean install zip samples d64 zap
+
%: %.c
%: %.s
# --------------------------------------------------------------------------
# Rules to make the binaries
-.PHONY: all samples
all:
samples: $(EXELIST)
# Rule to make a CBM disk with all samples. Needs the c1541 program that comes
# with the VICE emulator.
-.PHONY: d64
d64: samples.d64
samples.d64: samples
INSTALL = install
samplesdir = $(prefix)/share/cc65
-.PHONY: install
+
install:
$(if $(prefix),,$(error variable `prefix' must be set))
$(INSTALL) -d $(DESTDIR)$(samplesdir)
# --------------------------------------------------------------------------
# Packaging rules
-.PHONY: zip
zip:
@cd .. && zip -r cc65 samples/
# --------------------------------------------------------------------------
# Clean-up rules
-.PHONY: mostlyclean
mostlyclean:
-.PHONY: clean
clean:
$(RM) *.map *.o *.s *.lbl
-.PHONY: zap
zap: clean
$(RM) $(EXELIST) samples.d64
$(RM) multdemo.? ovrldemo.?