]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/Makefile
Moved the 'common' files from 'geos-cbm' to 'geos-common' which are believed to work...
[cc65] / libsrc / geos-common / 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../$(SYS) -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 #--------------------------------------------------------------------------
30 # Directories
31
32 DIRS =  common          \
33         dlgbox          \
34         disk            \
35         file            \
36         graph           \
37         memory          \
38         menuicon        \
39         mousesprite     \
40         process         \
41         runtime         \
42         system
43
44 #--------------------------------------------------------------------------
45 # Directives
46
47 include $(addsuffix /Makefile, $(DIRS))
48 vpath %.c $(DIRS)
49 vpath %.s $(DIRS)
50
51 #--------------------------------------------------------------------------
52 # Targets
53
54 .PHONY: all clean zap
55
56 all:    $(C_OBJS) $(S_OBJS)
57
58 clean:
59         @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS)
60
61 zap:    clean