]> git.sur5r.net Git - cc65/blob - libsrc/apple2enh/Makefile
Update from Oliver Schmidt: Includes gotox/gotoy which were missing before.
[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) $(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 %.tgi:  %.o ../runtime/zeropage.o
36         @$(LD) -t module -o $@ $^
37
38 #--------------------------------------------------------------------------
39 # Object files
40
41 OBJS=   _scrsize.o      \
42         break.o         \
43         cclear.o        \
44         cgetc.o         \
45         chline.o        \
46         clrscr.o        \
47         color.o         \
48         cputc.o         \
49         crt0.o          \
50         ctype.o         \
51         cvline.o        \
52         dioclose.o      \
53         diocommon.o     \
54         dioopen.o       \
55         dioread.o       \
56         diosectcount.o  \
57         diosectsize.o   \
58         diowrite.o      \
59         dosdetect.o     \
60         get_ostype.o    \
61         getenv.o        \
62         gotoxy.o        \
63         gotoy.o         \
64         joy_stddrv.o    \
65         kbhit.o         \
66         mainargs.o      \
67         mli.o           \
68         oserrlist.o     \
69         randomize.o     \
70         rcout.o         \
71         read.o          \
72         revers.o        \
73         rhome.o         \
74         rom.o           \
75         rpread.o        \
76         rrdkey.o        \
77         rvtabz.o        \
78         systime.o       \
79         sysuname.o      \
80         textframe.o     \
81         tgi_mode_table.o\
82         wherex.o        \
83         wherey.o        \
84         write.o
85
86 #--------------------------------------------------------------------------
87 # Drivers
88
89 EMDS = apple2-lc.emd
90
91 JOYS = apple2-stdjoy.joy
92
93 SERS =
94
95 TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
96
97 #--------------------------------------------------------------------------
98 # Targets
99
100 .PHONY: all clean zap
101
102 all:    $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
103
104 ../runtime/zeropage.o:
105         $(MAKE) -C $(dir $@) $(notdir $@)
106
107 clean:
108         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
109
110 zap:    clean
111         @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
112
113