alarm-clock-6502/Makefile
Bill Chatfield 6648236fb6 Added stuff
2015-08-24 02:40:05 -04:00

55 lines
920 B
Makefile

# Builds the Alarm Clock app
#
# Requirements:
# 1. Gmake must be used.
# 2. The cc65 compiler must be properly setup. See setup-cc65.
#
ifndef CC65_TARGET
CC65_TARGET:=apple2enh
endif
PGM=alarmclk
OBJS=alarmclk.o 12hourclk.o clkfreq.o
PGM2=calibrate
OBJS2=calibrate.o
CC=cl65
AS=ca65
LD=ld65
CFLAGS=-t $(CC65_TARGET) -O
ASFLAGS=-t $(CC65_TARGET)
LDFLAGS=-t $(CC65_TARGET)
DISK_VOL=alarmclk
DISK=$(DISK_VOL).dsk
AC=java -jar lib/AppleCommander-1.3.5.14.jar
MKDISK=$(AC) -pro140 $(DISK) $(DISK_VOL)
########################################
all: $(DISK)
$(DISK): $(PGM) $(PGM2)
$(AC) -d $(DISK) $<
$(AC) -cc65 $(DISK) $< BIN < $<
$(AC) -d $(DISK) $(PGM2)
$(AC) -cc65 $(DISK) $(PGM2) BIN < $(PGM2)
$(PGM): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
$(PGM2): $(OBJS2)
$(CC) $(LDFLAGS) -o $@ $^
# Compile and assemble rules use the defuault rules after CC and CFLAGS
# are set.
clean:
$(RM) $(PGM) $(PGM2) *.o