#
# Enter the target system here
-SYS = c64
+SYS = c64
# Determine the path to the executables and libraries. If the samples
# directory is part of a complete source tree, use the stuff from that
endif
# This one comes with VICE
-C1541 = c1541
+C1541 = c1541
# --------------------------------------------------------------------------
# System-dependent settings
# List of executables. This list could be made target-dependent by checking
# $(SYS).
-EXELIST = ascii \
- diodemo \
- enumdevdir \
- fire \
- gunzip65 \
- hello \
- mandelbrot \
- mousetest \
- multdemo \
- nachtm \
- ovrldemo \
- plasma \
- sieve \
- tgidemo
+EXELIST = ascii \
+ diodemo \
+ enumdevdir \
+ fire \
+ gunzip65 \
+ hello \
+ mandelbrot \
+ mousetest \
+ multdemo \
+ nachtm \
+ ovrldemo \
+ plasma \
+ sieve \
+ tgidemo
# --------------------------------------------------------------------------
# Rules to make the binaries
.PHONY: all samples
all:
-samples: $(EXELIST)
+samples: $(EXELIST)
# --------------------------------------------------------------------------
# Overlay rules. Overlays need special ld65 configuration files. Also, the
# overlay file-names are shortenned to fit the Atari's 8.3-character limit.
-multdemo: multidemo.o
+multdemo: multidemo.o
@$(LD) -o $@ -C $(SYS)-overlay.cfg -m $@.map $^ $(CLIB)
-ovrldemo: overlaydemo.o
+ovrldemo: overlaydemo.o
@$(LD) -o $@ -C $(SYS)-overlay.cfg -m $@.map $^ $(CLIB)
# --------------------------------------------------------------------------
# Rule to make a CBM disk with all samples. Needs the c1541 program that comes
# with the VICE emulator.
-.PHONY: d64
-d64: samples.d64
+.PHONY: d64
+d64: samples.d64
-samples.d64: samples
+samples.d64: samples
@$(C1541) -format samples,AA d64 $@ > /dev/null
@for exe in $(EXELIST); do\
$(C1541) -attach $@ -write $$exe > /dev/null || exit $$?;\
INSTALL = install
samplesdir = $(prefix)/share/cc65
-.PHONY: install
+.PHONY: install
install:
$(if $(prefix),,$(error variable `prefix' must be set))
$(INSTALL) -d $(DESTDIR)$(samplesdir)
# --------------------------------------------------------------------------
# Packaging rules
-.PHONY: zip
+.PHONY: zip
zip:
@cd .. && zip -r cc65 samples/
.PHONY: mostlyclean
mostlyclean:
-.PHONY: clean
+.PHONY: clean
clean:
$(RM) *.map *.o *.s *.lbl
-.PHONY: zap
-zap: clean
+.PHONY: zap
+zap: clean
$(RM) $(EXELIST) samples.d64
$(RM) multdemo.? ovrldemo.?