]> git.sur5r.net Git - cc65/blob - libsrc/apple2enh/Makefile
Added support for switching between 40/80 columns. As the Apple //e 80 column firmwar...
[cc65] / libsrc / apple2enh / Makefile
1 #
2 # makefile for CC65 runtime library
3 #
4
5 .SUFFIXES: .o .s .c
6
7 #--------------------------------------------------------------------------
8 # Programs and flags
9
10 SYS     = apple2enh
11
12 AS      = ../../src/ca65/ca65
13 CC      = ../../src/cc65/cc65
14 LD      = ../../src/ld65/ld65
15
16 AFLAGS  = -t $(SYS) -I../apple2 -I../../asminc
17 CFLAGS  = -Osir -g -T -t $(SYS) --forget-inc-paths -I ../apple2 -I ../../include
18
19 #--------------------------------------------------------------------------
20 # Rules
21
22 %.o:    ../apple2/%.c
23         @$(CC) -o $(notdir $(*).s) $(CFLAGS) $<
24         @$(AS) -o $@ $(AFLAGS) $(*).s
25
26 %.o:    ../apple2/%.s
27         @$(AS) -g -o $@ $(AFLAGS) $<
28
29 %.emd:  %.o ../runtime/zeropage.o
30         @$(LD) -t module -o $@ $^
31
32 %.joy:  %.o ../runtime/zeropage.o
33         @$(LD) -t module -o $@ $^
34
35 %.mou:  %.o ../runtime/zeropage.o
36         @$(LD) -t module -o $@ $^
37
38 %.ser:  %.o ../runtime/zeropage.o
39         @$(LD) -t module -o $@ $^
40
41 %.tgi:  %.o ../runtime/zeropage.o
42         @$(LD) -t module -o $@ $^
43
44 #--------------------------------------------------------------------------
45 # Object files
46
47 C_OBJS= closedir.o      \
48         opendir.o       \
49         readdir.o       \
50         rewinddir.o
51
52 S_OBJS= _scrsize.o      \
53         break.o         \
54         cclear.o        \
55         cgetc.o         \
56         chline.o        \
57         close.o         \
58         clrscr.o        \
59         color.o         \
60         cout.o          \
61         cputc.o         \
62         crt0.o          \
63         ctype.o         \
64         cvline.o        \
65         dioclose.o      \
66         diocommon.o     \
67         dioopen.o       \
68         dioread.o       \
69         diosectcount.o  \
70         diosectsize.o   \
71         diowrite.o      \
72         dosdetect.o     \
73         filedes.o       \
74         fileerr.o       \
75         filename.o      \
76         get_ostype.o    \
77         gotoxy.o        \
78         gotoy.o         \
79         home.o          \
80         initcwd.o       \
81         joy_stddrv.o    \
82         kbhit.o         \
83         mainargs.o      \
84         mcbdefault.o    \
85         mli.o           \
86         open.o          \
87         oserrlist.o     \
88         oserror.o       \
89         randomize.o     \
90         rdkey.o         \
91         read.o          \
92         revers.o        \
93         rwcommon.o      \
94         syschdir.o      \
95         sysmkdir.o      \
96         sysremove.o     \
97         sysrename.o     \
98         sysrmdir.o      \
99         systime.o       \
100         sysuname.o      \
101         textframe.o     \
102         tgi_mode_table.o\
103         videomode.o     \
104         vtabz.o         \
105         wherex.o        \
106         wherey.o        \
107         write.o
108
109 #--------------------------------------------------------------------------
110 # Drivers
111
112 EMDS = apple2-auxmem.emd
113
114 JOYS = apple2-stdjoy.joy
115
116 MOUS = apple2-stdmou.mou
117
118 SERS = apple2-ssc.ser
119
120 TGIS = apple2-280-192-8.tgi apple2-40-48-16.tgi
121
122 #--------------------------------------------------------------------------
123 # Targets
124
125 .PHONY: all clean zap
126
127 all:    $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
128
129 ../runtime/zeropage.o:
130         $(MAKE) -C $(dir $@) $(notdir $@)
131
132 clean:
133         @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
134
135 zap:    clean
136         @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)