]> git.sur5r.net Git - cc65/blob - libsrc/apple2enh/Makefile
Added a Makefile
[cc65] / libsrc / apple2enh / Makefile
1 #
2 # makefile for CC65 runtime library
3 #
4
5 .SUFFIXES: .o .s .c
6
7 #--------------------------------------------------------------------------
8 # Rules
9
10 %.o:    %.c
11         @$(CC) $(CFLAGS) $<
12         @$(AS) -o $@ $(AFLAGS) $(*).s
13
14 %.o:    %.s
15         @$(AS) -g -o $@ $(AFLAGS) $<
16
17 %.emd:  %.o ../runtime/zeropage.o
18         @$(LD) -t module -o $@ $^
19
20 %.joy:  %.o ../runtime/zeropage.o
21         @$(LD) -t module -o $@ $^
22
23 %.tgi:  %.o ../runtime/zeropage.o
24         @$(LD) -t module -o $@ $^
25
26 #--------------------------------------------------------------------------
27 # Object files
28
29 OBJS=   chline.o        \
30         cputc.o         \
31         cvline.o        \
32         textframe.o
33
34 #--------------------------------------------------------------------------
35 # Drivers
36
37 EMDS =
38
39 JOYS =
40
41 SERS =
42
43 TGIS =
44
45 #--------------------------------------------------------------------------
46 # Targets
47
48 .PHONY: all clean zap
49
50 all:    $(OBJS) $(EMDS) $(JOYS) $(SERS) $(TGIS)
51
52 ../runtime/zeropage.o:
53         $(MAKE) -C $(dir $@) $(notdir $@)
54
55 clean:
56         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
57
58 zap:    clean
59         @$(RM) $(EMDS) $(JOYS) $(SERS) $(TGIS)
60
61