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