]> git.sur5r.net Git - cc65/blob - libsrc/apple2enh/Makefile
Remove getenv.o
[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 %.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         close.o         \
47         clrscr.o        \
48         color.o         \
49         cputc.o         \
50         crt0.o          \
51         ctype.o         \
52         cvline.o        \
53         dioclose.o      \
54         diocommon.o     \
55         dioopen.o       \
56         dioread.o       \
57         diosectcount.o  \
58         diosectsize.o   \
59         diowrite.o      \
60         dosdetect.o     \
61         filedes.o       \
62         fileerr.o       \
63         filename.o      \
64         get_ostype.o    \
65         gotoxy.o        \
66         gotoy.o         \
67         initcwd.o       \
68         joy_stddrv.o    \
69         kbhit.o         \
70         mainargs.o      \
71         mli.o           \
72         open.o          \
73         oserrlist.o     \
74         oserror.o       \
75         randomize.o     \
76         rcout.o         \
77         read.o          \
78         revers.o        \
79         rhome.o         \
80         rom.o           \
81         rpread.o        \
82         rrdkey.o        \
83         rvtabz.o        \
84         rwcommon.o      \
85         systime.o       \
86         sysuname.o      \
87         textframe.o     \
88         tgi_mode_table.o\
89         wherex.o        \
90         wherey.o        \
91         write.o
92
93 #--------------------------------------------------------------------------
94 # Drivers
95
96 EMDS = apple2-lc.emd
97
98 JOYS = apple2-stdjoy.joy
99
100 SERS =
101
102 TGIS = apple2-40-40-16.tgi apple2-280-192-6.tgi
103
104 #--------------------------------------------------------------------------
105 # Targets
106
107 .PHONY: all clean zap
108
109 all:    $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
110
111 ../runtime/zeropage.o:
112         $(MAKE) -C $(dir $@) $(notdir $@)
113
114 clean:
115         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
116
117 zap:    clean
118         @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
119
120