]> git.sur5r.net Git - cc65/blobdiff - libsrc/pet/Makefile
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
[cc65] / libsrc / pet / Makefile
index 8671414ae7fdfe6da70750b95bfce1ecbf6d27cb..7772573f11c40d1f665adf3a161c422d851721a5 100644 (file)
@@ -26,6 +26,15 @@ CFLAGS       = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
 %.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
 
@@ -56,15 +65,29 @@ OBJS =      _scrsize.o      \
        revers.o        \
         sysuname.o
 
+#--------------------------------------------------------------------------
+# Drivers
+
+EMDS =
+
+JOYS = pet-ptvjoy.joy
+
+TGIS =
+
 #--------------------------------------------------------------------------
 # Targets
 
 .PHONY:        all clean zap
 
-all:   $(OBJS)
+all:   $(OBJS) $(EMDS) $(JOYS) $(TGIS)
+
+../runtime/zeropage.o:
+       $(MAKE) -C $(dir $@) $(notdir $@)
 
 clean:
-       @$(RM) $(OBJS)
+       @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
 
 zap:   clean
+       @$(RM) $(EMDS) $(JOYS) $(TGIS)
+