2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2003-05-02 09:03:47 +00:00
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -t module -o $@ $^
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
OBJS= _scrsize.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
break.o \
|
|
|
|
cclear.o \
|
|
|
|
cgetc.o \
|
|
|
|
chline.o \
|
|
|
|
clrscr.o \
|
|
|
|
color.o \
|
|
|
|
cputc.o \
|
|
|
|
crt0.o \
|
|
|
|
ctype.o \
|
|
|
|
cvline.o \
|
2003-05-02 14:39:05 +00:00
|
|
|
getenv.o \
|
2003-05-02 09:03:47 +00:00
|
|
|
joy_stddrv.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
kbhit.o \
|
2003-03-10 21:21:46 +00:00
|
|
|
mainargs.o \
|
2002-11-07 12:16:15 +00:00
|
|
|
randomize.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
read.o \
|
|
|
|
revers.o \
|
2002-11-12 22:49:38 +00:00
|
|
|
systime.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
where.o \
|
|
|
|
write.o
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-05-02 09:03:47 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS =
|
|
|
|
|
|
|
|
JOYS = apple2-stdjoy.joy
|
|
|
|
|
|
|
|
TGIS =
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2003-05-02 09:03:47 +00:00
|
|
|
all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
|
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2003-05-02 09:03:47 +00:00
|
|
|
@rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
2003-05-02 09:03:47 +00:00
|
|
|
@rm -f $(EMDS) $(JOYS) $(TGIS)
|
2000-11-23 19:05:32 +00:00
|
|
|
|