]> git.sur5r.net Git - cc65/blob - libsrc/c16/Makefile
New EM driver for the C16
[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 %.ser:  %.o ../runtime/zeropage.o
24         @$(LD) -t module -o $@ $^
25
26 %.tgi:  %.o ../runtime/zeropage.o
27         @$(LD) -t module -o $@ $^
28
29 #--------------------------------------------------------------------------
30 # Object files
31
32 OBJS =  _scrsize.o      \
33         break.o         \
34         cgetc.o         \
35         clrscr.o        \
36         color.o         \
37         conio.o         \
38         cputc.o         \
39         crt0.o          \
40         get_tv.o        \
41         joy_stddrv.o    \
42         kbhit.o         \
43         kernal.o        \
44         mainargs.o      \
45         randomize.o     \
46         revers.o        \
47         sysuname.o
48
49 #--------------------------------------------------------------------------
50 # Drivers
51
52 EMDS = c16-ram.emd
53
54 JOYS = c16-stdjoy.joy
55
56 SERS =
57
58 TGIS =
59
60 #--------------------------------------------------------------------------
61 # Targets
62
63 .PHONY: all clean zap
64
65 all:    $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
66
67 ../runtime/zeropage.o:
68         $(MAKE) -C $(dir $@) $(notdir $@)
69
70 clean:
71         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
72
73 zap:    clean
74         @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
75