]> git.sur5r.net Git - cc65/blob - libsrc/apple2/Makefile
New loadable mouse drivers
[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         get_ostype.o    \
41         getenv.o        \
42         joy_stddrv.o    \
43         kbhit.o         \
44         mainargs.o      \
45         randomize.o     \
46         read.o          \
47         revers.o        \
48         systime.o       \
49         sysuname.o      \
50         tgi_mode_table.o\
51         wherex.o        \
52         wherey.o        \
53         write.o
54
55 #--------------------------------------------------------------------------
56 # Drivers
57
58 EMDS =
59
60 JOYS = apple2-stdjoy.joy
61
62 SERS = apple2-lc.emd
63
64 TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
65
66 #--------------------------------------------------------------------------
67 # Targets
68
69 .PHONY: all clean zap
70
71 all:    $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
72
73 ../runtime/zeropage.o:
74         $(MAKE) -C $(dir $@) $(notdir $@)
75
76 clean:
77         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
78
79 zap:    clean
80         @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
81