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