home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cc65v261.zip / cc65.zip / samples / Makefile < prev    next >
Makefile  |  2000-12-18  |  931b  |  58 lines

  1. #
  2. # Makefile for cc65 samples
  3. #
  4. # This Makefile requires GNU make
  5. #
  6.  
  7. # Enter the target system here
  8. SYS    = c64
  9.  
  10. CRT0       = ../libsrc/$(SYS).o
  11. CLIB    = ../libsrc/$(SYS).lib
  12. CC    = ../src/cc65/cc65
  13. CL    = ../src/cl65/cl65
  14. AS    = ../src/ca65/ca65
  15. LD    = ../src/ld65/ld65
  16. C1541      = c1541
  17.  
  18.  
  19. .c.o:
  20.     @echo $<
  21.     @$(CC) -g -Oirs -t $(SYS) -I../include/ $<
  22.     @$(AS) $(basename $<).s
  23.  
  24. .s.o:
  25.     @echo $<
  26.     @$(AS) $(basename $<).s
  27.  
  28.  
  29. .PHONY:    all
  30. all:       nachtm hello sieve
  31.  
  32. nachtm:    $(CRT0) nachtm.o $(CLIB)
  33.     @$(LD) -t $(SYS) -m nachtm.map -Ln nachtm.lbl -o $@ $^
  34.  
  35. hello:     $(CRT0) hello.o $(CLIB)
  36.     @$(LD) -t $(SYS) -m hello.map -Ln hello.lbl -o $@ $^
  37.  
  38. sieve:     $(CRT0) sieve.o $(CLIB)
  39.     @$(LD) -t $(SYS) -m sieve.map -Ln sieve.lbl -o $@ $^
  40.  
  41. .PHONY:    disk
  42. disk:    c64.d64
  43.  
  44. c64.d64:        all
  45.     $(C1541) < c1541.rsp
  46.  
  47. .PHONY:    clean
  48. clean:
  49.     rm -f *~ *.map *.o *.s *.lbl
  50.  
  51. .PHONY:    zap
  52. zap:    clean
  53.     rm -f nachtm hello
  54.  
  55.  
  56.  
  57.  
  58.