]> git.sur5r.net Git - cc65/blob - libsrc/apple2/Makefile
Add new maintainer
[cc65] / libsrc / apple2 / Makefile
1 #
2 # makefile for CC65 runtime library
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         cclear.o        \
32         cgetc.o         \
33         chline.o        \
34         clrscr.o        \
35         color.o         \
36         cputc.o         \
37         crt0.o          \
38         ctype.o         \
39         cvline.o        \
40         dosdetect.o     \
41         get_ostype.o    \
42         getenv.o        \
43         joy_stddrv.o    \
44         kbhit.o         \
45         mainargs.o      \
46         oserrlist.o     \
47         randomize.o     \
48         rbascalc.o      \
49         rcout.o         \
50         read.o          \
51         revers.o        \
52         rhome.o         \
53         rom.o           \
54         rpread.o        \
55         rrdkey.o        \
56         rsetwnd.o       \
57         systime.o       \
58         sysuname.o      \
59         tgi_mode_table.o\
60         wherex.o        \
61         wherey.o        \
62         write.o
63
64 #--------------------------------------------------------------------------
65 # Drivers
66
67 EMDS = apple2-lc.emd
68
69 JOYS = apple2-stdjoy.joy
70
71 SERS =
72
73 TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
74
75 #--------------------------------------------------------------------------
76 # Targets
77
78 .PHONY: all clean zap
79
80 all:    $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
81
82 ../runtime/zeropage.o:
83         $(MAKE) -C $(dir $@) $(notdir $@)
84
85 clean:
86         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
87
88 zap:    clean
89         @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
90