]> git.sur5r.net Git - cc65/blobdiff - libsrc/pet/Makefile
remove superfluous ".code" line
[cc65] / libsrc / pet / Makefile
index 86eb5b5b4e845c57f0adba953f93ebf2ec78de80..7772573f11c40d1f665adf3a161c422d851721a5 100644 (file)
@@ -4,6 +4,21 @@
 
 .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:           %.c
        @$(CC) $(CFLAGS) $<
        @$(AS) -o $@ $(AFLAGS) $(*).s
 %.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
+
 OBJS = _scrsize.o      \
        break.o         \
        cgetc.o         \
@@ -20,6 +47,7 @@ OBJS =        _scrsize.o      \
        conio.o         \
        cputc.o         \
        crt0.o          \
+       get_tv.o        \
        kbhit.o         \
         kbsout.o        \
         kchkin.o        \
@@ -32,9 +60,34 @@ OBJS =       _scrsize.o      \
         kreadst.o       \
         ksetlfs.o       \
         ksetnam.o       \
-        randomize.o
+        mainargs.o      \
+        randomize.o    \
+       revers.o        \
+        sysuname.o
+
+#--------------------------------------------------------------------------
+# Drivers
 
-all:   $(OBJS)
+EMDS =
+
+JOYS = pet-ptvjoy.joy
+
+TGIS =
+
+#--------------------------------------------------------------------------
+# Targets
+
+.PHONY:        all clean zap
+
+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)
+
+