]> 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 a09bde862baca2ed6e29a4ee64686c6d970aa405..7772573f11c40d1f665adf3a161c422d851721a5 100644 (file)
@@ -4,6 +4,18 @@
 
 .SUFFIXES: .o .s .c
 
+#--------------------------------------------------------------------------
+# Programs and flags
+
+SYS    = pet
+
+AS     = ../../src/ca65/ca65
+CC     = ../../src/cc65/cc65
+LD     = ../../src/ld65/ld65
+
+AFLAGS = -t $(SYS) -I../../asminc
+CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
+
 #--------------------------------------------------------------------------
 # Rules
 
 %.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
 
@@ -26,6 +47,7 @@ OBJS =        _scrsize.o      \
        conio.o         \
        cputc.o         \
        crt0.o          \
+       get_tv.o        \
        kbhit.o         \
         kbsout.o        \
         kchkin.o        \
@@ -40,17 +62,32 @@ OBJS =      _scrsize.o      \
         ksetnam.o       \
         mainargs.o      \
         randomize.o    \
-       revers.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 -f $(OBJS)
+       @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
 
 zap:   clean
+       @$(RM) $(EMDS) $(JOYS) $(TGIS)
+