# Rules
%.o: ../apple2/%.c
- @$(CC) $(CFLAGS) $<
+ @$(CC) -o $(notdir $(*).s) $(CFLAGS) $<
@$(AS) -o $@ $(AFLAGS) $(*).s
%.o: ../apple2/%.s
%.joy: %.o ../runtime/zeropage.o
@$(LD) -t module -o $@ $^
+%.mou: %.o ../runtime/zeropage.o
+ @$(LD) -t module -o $@ $^
+
+%.ser: %.o ../runtime/zeropage.o
+ @$(LD) -t module -o $@ $^
+
%.tgi: %.o ../runtime/zeropage.o
@$(LD) -t module -o $@ $^
#--------------------------------------------------------------------------
# Object files
-OBJS= _scrsize.o \
+C_OBJS= closedir.o \
+ opendir.o \
+ readdir.o \
+ rewinddir.o
+
+S_OBJS= _scrsize.o \
break.o \
cclear.o \
cgetc.o \
chline.o \
+ close.o \
clrscr.o \
color.o \
cputc.o \
diosectsize.o \
diowrite.o \
dosdetect.o \
+ filedes.o \
+ fileerr.o \
+ filename.o \
get_ostype.o \
- getenv.o \
+ gotoxy.o \
+ gotoy.o \
+ initcwd.o \
joy_stddrv.o \
kbhit.o \
mainargs.o \
+ mcbdefault.o \
mli.o \
+ open.o \
oserrlist.o \
+ oserror.o \
randomize.o \
rcout.o \
read.o \
rpread.o \
rrdkey.o \
rvtabz.o \
+ rwcommon.o \
+ syschdir.o \
+ sysmkdir.o \
+ sysremove.o \
+ sysrename.o \
+ sysrmdir.o \
systime.o \
sysuname.o \
textframe.o \
JOYS = apple2-stdjoy.joy
-SERS =
+MOUS = apple2-stdmou.mou
+
+SERS = apple2-ssc.ser
TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
.PHONY: all clean zap
-all: $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
+all: $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
../runtime/zeropage.o:
$(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
+ @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
zap: clean
- @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
-
-
+ @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)