]> git.sur5r.net Git - cc65/blob - libsrc/atari/Makefile
9a3cb5ace716a4fe6b67addc61c46feaec11259b
[cc65] / libsrc / atari / Makefile
1 #
2 # makefile for CC65 Atari runtime library
3 #
4 # NUMDRVS - number of supported drives (max. 16)
5 # UCASE_FILENAME - all filenames get uppercased
6
7 ATARIDEFS = -DNUMDRVS=4 -DUCASE_FILENAME=1
8
9 .SUFFIXES: .o .s .c
10
11 #--------------------------------------------------------------------------
12 # Rules
13
14 %.o:    %.c
15         @$(CC) $(CFLAGS) $(ATARIDEFS) $<
16         @$(AS) -o $@ $(AFLAGS) $(*).s
17
18 %.o:    %.s
19         @$(AS) -g -o $@ $(AFLAGS) $(ATARIDEFS) $<
20
21 %.emd:  %.o ../runtime/zeropage.o
22         @$(LD) -t module -o $@ $^
23
24 %.joy:  %.o ../runtime/zeropage.o
25         @$(LD) -t module -o $@ $^
26
27 %.tgi:  %.o ../runtime/zeropage.o
28         @$(LD) -t module -o $@ $^
29
30 #--------------------------------------------------------------------------
31 # Object files
32
33 OBJS =  _scrsize.o   \
34         break.o      \
35         cclear.o     \
36         cgetc.o      \
37         chline.o     \
38         clock.o      \
39         close.o      \
40         clrscr.o     \
41         color.o      \
42         cputc.o      \
43         crt0.o       \
44         ctype.o      \
45         cvline.o     \
46         dio_cts.o    \
47         dio_stc.o    \
48         diopncls.o   \
49         dioread.o    \
50         diowrite.o   \
51         diowritev.o  \
52         fdtable.o    \
53         getargs.o    \
54         getfd.o      \
55         gotox.o      \
56         gotoy.o      \
57         gotoxy.o     \
58         graphics.o   \
59         graphuse.o   \
60         kbhit.o      \
61         lseek.o      \
62         mouse.o      \
63         mul40.o      \
64         open.o       \
65         oserrlist.o  \
66         oserror.o    \
67         ostype.o     \
68         randomize.o  \
69         read.o       \
70         readjoy.o    \
71         remove.o     \
72         revers.o     \
73         rs232.o      \
74         rwcommon.o   \
75         savevec.o    \
76         scroll.o     \
77         setcolor.o   \
78         siocall.o    \
79         systime.o    \
80         tvtype.o     \
81         ucase_fn.o   \
82         where.o      \
83         write.o
84
85
86 #--------------------------------------------------------------------------
87 # Drivers
88
89 EMDS =
90
91 JOYS = atari-stdjoy.joy
92
93 TGIS =
94
95 #--------------------------------------------------------------------------
96 # Targets
97
98 all:    $(OBJS) $(EMDS) $(JOYS) $(TGIS)
99
100 ../runtime/zeropage.o:
101         $(MAKE) -C $(dir $@) $(notdir $@)
102
103 clean:
104         @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
105