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