]> git.sur5r.net Git - cc65/blob - libsrc/geos-cbm/Makefile
Moved the 'menuicon' files from 'geos-cbm' to 'geos-common' which are believed to...
[cc65] / libsrc / geos-cbm / Makefile
1 #
2 # makefile for CC65 runtime library
3 #
4
5 .SUFFIXES: .o .s .c
6
7 #--------------------------------------------------------------------------
8 # Programs and flags
9
10 SYS     = geos-cbm
11
12 AS      = ../../src/ca65/ca65
13 CC      = ../../src/cc65/cc65
14 LD      = ../../src/ld65/ld65
15
16 AFLAGS  = -t $(SYS) --forget-inc-paths -I. -I../../asminc
17 CFLAGS  = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
18
19 #--------------------------------------------------------------------------
20 # Rules
21
22 %.o:    %.c
23         @$(CC) -o $(notdir $(*).s) $(CFLAGS) $<
24         @$(AS) -o $@ $(AFLAGS) $(*).s
25
26 %.o:    %.s
27         @$(AS) -g -o $@ $(AFLAGS) $<
28
29 %.emd:  %.o ../runtime/zeropage.o
30         @$(LD) -o $@ -t module $^
31
32 %.joy:  %.o ../runtime/zeropage.o
33         @$(LD) -o $@ -t module $^
34
35 %.mou:  %.o ../runtime/zeropage.o
36         @$(LD) -o $@ -t module $^
37
38 %.ser:  %.o ../runtime/zeropage.o
39         @$(LD) -o $@ -t module $^
40
41 %.tgi:  %.o ../runtime/zeropage.o
42         @$(LD) -o $@ -t module $^
43
44 #--------------------------------------------------------------------------
45 # Directories
46
47 DIRS =  common          \
48         conio           \
49         devel           \
50         disk            \
51         file            \
52         memory          \
53         mousesprite     \
54         process         \
55         runtime         \
56         system
57
58 #--------------------------------------------------------------------------
59 # Drivers
60
61 EMDS = geos-vdc.emd
62
63 JOYS = geos-stdjoy.joy
64
65 MOUS = #geos-stdmou.mou
66
67 SERS =
68
69 TGIS = geos-tgi.tgi
70
71 #--------------------------------------------------------------------------
72 # Directives
73
74 include $(addsuffix /Makefile, $(DIRS))
75 vpath %.c $(DIRS)
76 vpath %.s $(DIRS)
77
78 #--------------------------------------------------------------------------
79 # Targets
80
81 .PHONY: all clean zap
82
83 all:    $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
84
85 ../runtime/zeropage.o:
86         $(MAKE) -C $(dir $@) $(notdir $@)
87
88 clean:
89         @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
90
91 zap:    clean
92         @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)