]> git.sur5r.net Git - cc65/blob - libsrc/atari/Makefile
Removed an unused .import
[cc65] / libsrc / atari / Makefile
1 #
2 # makefile for CC65 Atari runtime library
3 #
4 # NUMDRVS - number of supported drives (max. 16)
5 #           4 bytes for each device are statically allocated
6 # LINEBUF - support line buffered reads from E: (the number specifies
7 #           the length of the buffer)
8 # UCASE_FILENAME - all filenames get uppercased
9 # DEFAULT_DEVICE - if the string passed to the uppercase function doesn't
10 #                  include a device (":" at position 2 or 3), provide "D:"
11 #                  as a default device
12 #                  needs UCASE_FILENAME to be defined, otherwise no effect
13
14 ATARIDEFS = -DNUMDRVS=4 -DUCASE_FILENAME=1 -DDEFAULT_DEVICE=1 -DLINEBUF=80
15
16 .SUFFIXES: .o .s .c
17
18 #--------------------------------------------------------------------------
19 # Rules
20
21 %.o:    %.c
22         @$(CC) $(CFLAGS) $(ATARIDEFS) $<
23         @$(AS) -o $@ $(AFLAGS) $(*).s
24
25 %.o:    %.s
26         @$(AS) -g -o $@ $(AFLAGS) $(ATARIDEFS) $<
27
28 %.emd:  %.o ../runtime/zeropage.o
29         @$(LD) -t module -o $@ $^
30
31 %.joy:  %.o ../runtime/zeropage.o
32         @$(LD) -t module -o $@ $^
33
34 %.tgi:  %.o ../runtime/zeropage.o
35         @$(LD) -t module -o $@ $^
36
37 #--------------------------------------------------------------------------
38 # Object files
39
40 OBJS =  _scrsize.o      \
41         break.o         \
42         cclear.o        \
43         cgetc.o         \
44         chline.o        \
45         clock.o         \
46         close.o         \
47         clrscr.o        \
48         color.o         \
49         cputc.o         \
50         crt0.o          \
51         ctype.o         \
52         cvline.o        \
53         dio_cts.o       \
54         dio_stc.o       \
55         diopncls.o      \
56         dioread.o       \
57         diowrite.o      \
58         diowritev.o     \
59         dosdetect.o     \
60         fdtable.o       \
61         getargs.o       \
62         getdefdev.o     \
63         getfd.o         \
64         gotox.o         \
65         gotoy.o         \
66         gotoxy.o        \
67         graphics.o      \
68         graphuse.o      \
69         joy_stddrv.o    \
70         kbhit.o         \
71         lseek.o         \
72         mouse.o         \
73         mul40.o         \
74         open.o          \
75         oserrlist.o     \
76         oserror.o       \
77         ostype.o        \
78         randomize.o     \
79         read.o          \
80         revers.o        \
81         rs232.o         \
82         rwcommon.o      \
83         savevec.o       \
84         scroll.o        \
85         setcolor.o      \
86         siocall.o       \
87         sysremove.o     \
88         systime.o       \
89         tvtype.o        \
90         sysuname.o      \
91         ucase_fn.o      \
92         wherex.o        \
93         wherey.o        \
94         write.o
95
96
97 #--------------------------------------------------------------------------
98 # Drivers
99
100 EMDS =
101
102 JOYS = atari-stdjoy.joy
103
104 TGIS =
105
106 #--------------------------------------------------------------------------
107 # Targets
108
109 all:    $(OBJS) $(EMDS) $(JOYS) $(TGIS)
110
111 ../runtime/zeropage.o:
112         $(MAKE) -C $(dir $@) $(notdir $@)
113
114 clean:
115         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
116
117 zap:    clean
118         @$(RM) $(EMDS) $(JOYS) $(TGIS)
119