2001-09-13 21:09:19 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2003-02-16 14:41:12 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o cbm510zp.o
|
2002-12-10 10:30:01 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-02-16 14:41:12 +00:00
|
|
|
%.joy: %.o ../runtime/zeropage.o cbm510zp.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.tgi: %.o ../runtime/zeropage.o cbm510zp.o
|
2002-12-10 10:30:01 +00:00
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2001-09-13 21:09:19 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
|
|
|
OBJS = _scrsize.o \
|
|
|
|
banking.o \
|
|
|
|
break.o \
|
|
|
|
cgetc.o \
|
2001-09-14 09:52:30 +00:00
|
|
|
clrscr.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
color.o \
|
2001-09-14 14:37:08 +00:00
|
|
|
conio.o \
|
|
|
|
cputc.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
crt0.o \
|
2003-02-16 14:41:12 +00:00
|
|
|
extzp.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
kbhit.o \
|
|
|
|
kirq.o \
|
|
|
|
kplot.o \
|
2001-09-13 21:09:19 +00:00
|
|
|
kscnkey.o \
|
2001-09-13 21:47:10 +00:00
|
|
|
kudtim.o \
|
2001-09-19 10:01:52 +00:00
|
|
|
mouse.o \
|
2001-09-14 09:52:30 +00:00
|
|
|
peeksys.o \
|
2001-09-14 20:52:54 +00:00
|
|
|
pokesys.o \
|
2002-11-05 10:48:20 +00:00
|
|
|
randomize.o \
|
2002-12-19 20:29:27 +00:00
|
|
|
revers.o \
|
2002-10-03 18:19:25 +00:00
|
|
|
rs232.o \
|
|
|
|
tgi_mode_table.o
|
2001-09-13 21:09:19 +00:00
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS = cbm510-ram.emd
|
|
|
|
|
2003-02-16 14:41:12 +00:00
|
|
|
JOYS = cbm510-stdjoy.joy
|
|
|
|
|
|
|
|
TGIS =
|
|
|
|
|
2002-12-10 10:30:01 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2003-02-16 14:41:12 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
|
2002-12-10 10:30:01 +00:00
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2001-09-13 21:09:19 +00:00
|
|
|
|
|
|
|
clean:
|
2003-02-16 14:41:12 +00:00
|
|
|
@rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
|
2001-09-13 21:09:19 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
|
|
|
@rm -f $(EMDS) $(JOYS) $(TGIS)
|
|
|
|
|