Converted the C16/Plus4 joystick code to modules

git-svn-id: svn://svn.cc65.org/cc65/trunk@1816 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-12-21 08:53:39 +00:00
parent a63a1075f8
commit d758e77835
7 changed files with 177 additions and 71 deletions

View File

@@ -4,6 +4,9 @@
.SUFFIXES: .o .s .c
#--------------------------------------------------------------------------
# Rules
%.o: %.c
@$(CC) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
@@ -11,6 +14,18 @@
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
%.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 $@ $^
#--------------------------------------------------------------------------
# Object files
OBJS = _scrsize.o \
break.o \
cgetc.o \
@@ -23,11 +38,26 @@ OBJS = _scrsize.o \
kbhit.o \
kernal.o \
randomize.o \
readjoy.o \
revers.o
revers.o
all: $(OBJS)
#--------------------------------------------------------------------------
# Drivers
EMDS =
JOYS =
TGIS =
#--------------------------------------------------------------------------
# Targets
all: $(OBJS) $(EMDS) $(JOYS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
@rm -f $(OBJS)
@rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)