]> git.sur5r.net Git - cc65/blob - libsrc/atari/Makefile
Don't add a mode when opening files for reading
[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         joy_stddrv.o \
61         kbhit.o      \
62         lseek.o      \
63         mouse.o      \
64         mul40.o      \
65         open.o       \
66         oserrlist.o  \
67         oserror.o    \
68         ostype.o     \
69         randomize.o  \
70         read.o       \
71         readjoy.o    \
72         remove.o     \
73         revers.o     \
74         rs232.o      \
75         rwcommon.o   \
76         savevec.o    \
77         scroll.o     \
78         setcolor.o   \
79         siocall.o    \
80         systime.o    \
81         tvtype.o     \
82         ucase_fn.o   \
83         wherex.o     \
84         wherey.o     \
85         write.o
86
87
88 #--------------------------------------------------------------------------
89 # Drivers
90
91 EMDS =
92
93 JOYS = atari-stdjoy.joy
94
95 TGIS =
96
97 #--------------------------------------------------------------------------
98 # Targets
99
100 all:    $(OBJS) $(EMDS) $(JOYS) $(TGIS)
101
102 ../runtime/zeropage.o:
103         $(MAKE) -C $(dir $@) $(notdir $@)
104
105 clean:
106         @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
107
108 zap:    clean
109         @rm -f $(EMDS) $(JOYS) $(TGIS)
110