]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/Makefile
Changed rm -f to $(RM)
[cc65] / libsrc / apple2 / Makefile
index 248cfae8b24f11783a61b536b8029b6a26a5c7a9..81ac2c98986a04182beab4b57347dd92cd02a2b1 100644 (file)
@@ -4,6 +4,9 @@
 
 .SUFFIXES: .o .s .c
 
+#--------------------------------------------------------------------------
+# Rules
+
 %.o:           %.c
        @$(CC) $(CFLAGS) $<
        @$(AS) -o $@ $(AFLAGS) $(*).s
 %.o:   %.s
        @$(AS) -g -o $@ $(AFLAGS) $<
 
-C_OBJS =
+%.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 $@ $^
 
-S_OBJS=        _scrsize.o      \
+#--------------------------------------------------------------------------
+# Object files
+
+OBJS=  _scrsize.o      \
        break.o         \
        cclear.o        \
        cgetc.o         \
@@ -24,17 +37,41 @@ S_OBJS=     _scrsize.o      \
        crt0.o          \
        ctype.o         \
        cvline.o        \
+        get_ostype.o    \
+        getenv.o        \
+        joy_stddrv.o    \
        kbhit.o         \
+        mainargs.o      \
         randomize.o     \
        read.o          \
        revers.o        \
         systime.o       \
+        sysuname.o      \
        where.o         \
        write.o
 
-all:   $(C_OBJS) $(S_OBJS)
+#--------------------------------------------------------------------------
+# Drivers
+
+EMDS =
+
+JOYS = apple2-stdjoy.joy
+
+TGIS =
+
+#--------------------------------------------------------------------------
+# Targets
+
+.PHONY:        all clean zap
+
+all:   $(OBJS) $(EMDS) $(JOYS) $(TGIS)
+
+../runtime/zeropage.o:
+       $(MAKE) -C $(dir $@) $(notdir $@)
 
 clean:
-       @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS)
+       @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
 
+zap:   clean
+       @$(RM) $(EMDS) $(JOYS) $(TGIS)