]> git.sur5r.net Git - cc65/blobdiff - samples/Makefile
New style mouse routines
[cc65] / samples / Makefile
index 40f0fa2e045c0e6b4317c4dddf9202611f60a453..f8fc0ffe7bf00c6098ec4a2423a45db92fcb3621 100644 (file)
@@ -21,7 +21,7 @@ C1541         = c1541
 
 .c.o:
        @echo $<
-       @$(CC) -Oirs -T --codesize 500 -g -t $(SYS) -I../include/ $<
+       @$(CC) -Oirs -T --forget-inc-paths --codesize 500 -g -t $(SYS) -I../include/ $<
        @$(AS) $(basename $<).s
 
 .s.o:
@@ -32,28 +32,37 @@ C1541       = c1541
 # --------------------------------------------------------------------------
 # Rules how to make each one of the binaries
 
-EXELIST=hello mousedemo nachtm plasma sieve tgidemo
+EXELIST=ascii fire gunzip65 hello mousedemo nachtm plasma sieve tgidemo
 
 .PHONY:        all
 all:           $(EXELIST)
 
-hello:                 $(CRT0) hello.o $(CLIB)
-       @$(LD) -t $(SYS) -m hello.map -Ln hello.lbl -o $@ $^
+ascii:                 $(CRT0) ascii.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
+
+fire:                  $(CRT0) fire.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
+
+gunzip65:              $(CRT0) gunzip65.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
+
+hello:                 $(CRT0) hello.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
 
 mousedemo:             $(CRT0) mousedemo.o $(CLIB)
-       @$(LD) -t $(SYS) -m mousedemo.map -Ln mousedemo.lbl -o $@ $^
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
 
-nachtm:                $(CRT0) nachtm.o $(CLIB)
-       @$(LD) -t $(SYS) -vm -m nachtm.map -Ln nachtm.lbl -o $@ $^
+nachtm:                $(CRT0) nachtm.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
 
-plasma:                $(CRT0) plasma.o $(CLIB)
-       @$(LD) -t $(SYS) -m plasma.map -Ln nachtm.lbl -o $@ $^
+plasma:                $(CRT0) plasma.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
 
-sieve:                 $(CRT0) sieve.o $(CLIB)
-       @$(LD) -t $(SYS) -m sieve.map -Ln sieve.lbl -o $@ $^
+sieve:                 $(CRT0) sieve.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
 
-tgidemo:       $(CRT0) tgidemo.o $(CLIB)
-       @$(LD) -t $(SYS) -m tgidemo.map -Ln tgidemo.lbl -o $@ $^
+tgidemo:               $(CRT0) tgidemo.o $(CLIB)
+       @$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
 
 
 # --------------------------------------------------------------------------
@@ -64,22 +73,24 @@ tgidemo:    $(CRT0) tgidemo.o $(CLIB)
 disk:          samples.d64
 
 samples.d64:   all
-       $(C1541) -format samples,AA  d64 $@
-       for exe in $(EXELIST); do\
-           $(C1541) -attach $@ -write $$exe;\
-       done
-
+       @$(C1541) -format samples,AA  d64 $@ > /dev/null
+       @for exe in $(EXELIST); do\
+           $(C1541) -attach $@ -write $$exe > /dev/null;\
+       done;\
+       for tgi in ../libsrc/$(SYS)*.tgi; do\
+           $(C1541) -attach $@ -write $$tgi > /dev/null;\
+       done;
 
 # --------------------------------------------------------------------------
 # Cleanup rules
 
 .PHONY:        clean
 clean:
-       rm -f *~ *.map *.o *.s *.lbl
+       $(RM) *~ *.map *.o *.s *.lbl
 
 .PHONY:        zap
 zap:   clean
-       rm -f $(EXELIST) samples.d64
+       $(RM) $(EXELIST) samples.d64