]> git.sur5r.net Git - cc65/blob - libsrc/c64/Makefile
Fixed a comment
[cc65] / libsrc / c64 / Makefile
1 #
2 # makefile for CC65 runtime library
3 #
4
5 .SUFFIXES: .o .s .c
6
7
8 #--------------------------------------------------------------------------
9 # Rules
10
11 %.o:    %.c
12         @$(CC) $(CFLAGS) $<
13         @$(AS) -o $@ $(AFLAGS) $(*).s
14
15 %.o:    %.s
16         @$(AS) -g -o $@ $(AFLAGS) $<
17
18 %.emd:  %.o ../runtime/zeropage.o
19         @$(LD) -t module -o $@ $^
20
21 %.joy:  %.o ../runtime/zeropage.o
22         @$(LD) -t module -o $@ $^
23
24 %.tgi:  %.o ../runtime/zeropage.o
25         @$(LD) -t module -o $@ $^
26
27 #--------------------------------------------------------------------------
28 # Object files
29
30 OBJS =  _scrsize.o              \
31         break.o                 \
32         crt0.o                  \
33         cgetc.o                 \
34         clrscr.o                \
35         color.o                 \
36         conio.o                 \
37         cputc.o                 \
38         get_tv.o                \
39         joy_stddrv.o            \
40         kbhit.o                 \
41         kernal.o                \
42         mouse.o                 \
43         randomize.o             \
44         revers.o                \
45         rs232.o                 \
46         tgi_mode_table.o
47
48 #--------------------------------------------------------------------------
49 # Drivers
50
51 EMDS = c64-georam.emd c64-ram.emd c64-ramcart.emd c64-reu.emd c64-vdc.emd
52
53 JOYS = c64-stdjoy.joy
54
55 TGIS = c64-320-200-2.tgi
56
57 #--------------------------------------------------------------------------
58 # Targets
59
60 .PHONY: all clean zap
61
62 all:    $(OBJS) $(EMDS) $(JOYS) $(TGIS)
63
64 ../runtime/zeropage.o:
65         $(MAKE) -C $(dir $@) $(notdir $@)
66
67 clean:
68         @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
69
70 zap:    clean
71         @rm -f $(EMDS) $(JOYS) $(TGIS)
72