]> git.sur5r.net Git - cc65/blob - libsrc/c64/Makefile
New uname function
[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         mainargs.o              \
43         mouse.o                 \
44         randomize.o             \
45         revers.o                \
46         rs232.o                 \
47         sysuname.o              \
48         tgi_mode_table.o
49
50 #--------------------------------------------------------------------------
51 # Drivers
52
53 EMDS = c64-georam.emd c64-ram.emd c64-ramcart.emd c64-reu.emd c64-vdc.emd
54
55 JOYS = c64-stdjoy.joy
56
57 TGIS = c64-320-200-2.tgi
58
59 #--------------------------------------------------------------------------
60 # Targets
61
62 .PHONY: all clean zap
63
64 all:    $(OBJS) $(EMDS) $(JOYS) $(TGIS)
65
66 ../runtime/zeropage.o:
67         $(MAKE) -C $(dir $@) $(notdir $@)
68
69 clean:
70         @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
71
72 zap:    clean
73         @rm -f $(EMDS) $(JOYS) $(TGIS)
74