]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/Makefile
added sleep() implementation
[cc65] / libsrc / apple2 / Makefile
index c87d436613be7de808341b7e4effb9dad635f375..75addc8274f5efa95364fd03c1437c533f44924e 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,16 +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) crt0.o
+       @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
 
+zap:   clean
+       @rm -f $(EMDS) $(JOYS) $(TGIS)