]> git.sur5r.net Git - cc65/blobdiff - libsrc/Makefile
Fixed a bug
[cc65] / libsrc / Makefile
index 3fb344c8c727fae4e01e0e6c1752a46ca1547df4..f0ae5e46c7201b6c7ef40581c186cf46621a0c62 100644 (file)
@@ -4,16 +4,19 @@
 
 .SUFFIXES: .o .obj .s .c
 
-# Defines for executables. The first two are passed to the submakes and are
-# relative to the subdirectories, the last one is used directly.
-CC = ../../src/cc65/cc65
-AS = ../../src/ca65/ca65
+# Defines for executables. AR is used within this makefile, the others are
+# passed to the submakes and contain paths relative to the subdirectories
+# handled by the make subprocesses.
 AR = ../src/ar65/ar65
+AS = ../../src/ca65/ca65
+CC = ../../src/cc65/cc65
+LD = ../../src/ld65/ld65
 
 # List of all targets
 ALLTARGETS =   apple2lib       \
                atarilib        \
                atmoslib        \
+               vic20lib        \
                c64lib          \
                c128lib         \
                cbm510lib       \
@@ -77,19 +80,37 @@ atmoslib:
            $(AR) a atmos.lib $$i/*.o;\
        done
 
+#-----------------------------------------------------------------------------
+# Vic20
+
+vic20lib:
+       for i in vic20 cbm common runtime conio dbg; do \
+           CC=$(CC) \
+           AS=$(AS) \
+           AFLAGS="-t vic20 -I../../asminc" \
+           CFLAGS="-Osir -g -T -t vic20 -I../../include" \
+           $(MAKE) -C $$i || exit 1; \
+       done
+       mv vic20/crt0.o vic20.o
+       for i in vic20 cbm common runtime conio dbg; do \
+           $(AR) a vic20.lib $$i/*.o;\
+       done
+
 #-----------------------------------------------------------------------------
 # C64
 
 c64lib:
-       for i in c64 cbm common runtime conio dbg; do \
-           CC=$(CC) \
+       for i in c64 cbm common runtime conio dbg tgi; do \
            AS=$(AS) \
-           CFLAGS="-Osir -g -T -t c64 -I../../include" \
+           CC=$(CC) \
+           LD=$(LD) \
            AFLAGS="-t c64 -I../../asminc" \
+           CFLAGS="-Osir -g -T -t c64 -I../../include" \
            $(MAKE) -C $$i || exit 1; \
        done
        mv c64/crt0.o c64.o
-       for i in c64 cbm common runtime conio dbg; do \
+       cp c64/*.tgi .
+       for i in c64 cbm common runtime conio dbg tgi; do \
            $(AR) a c64.lib $$i/*.o;\
        done
 
@@ -206,7 +227,7 @@ plus4lib:
 
 .PHONY: clean
 clean:
-       @for i in apple2 atari c128 c64 cbm cbm510 cbm610 common conio dbg geos pet plus4 runtime; do   \
+       @for i in apple2 atari c128 c64 cbm cbm510 cbm610 common conio dbg geos pet plus4 runtime tgi; do       \
           $(MAKE) -C $$i clean;                                                                        \
        done