]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/Makefile
0c316db90c1ee1b1c0028710b27cdaaa2b5d1a9e
[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 =  dlgbox          \
33         file            \
34         memory
35
36 #--------------------------------------------------------------------------
37 # Directives
38
39 include $(addsuffix /Makefile, $(DIRS))
40 vpath %.c $(DIRS)
41 vpath %.s $(DIRS)
42
43 #--------------------------------------------------------------------------
44 # Targets
45
46 .PHONY: all clean zap
47
48 all:    $(C_OBJS) $(S_OBJS)
49
50 clean:
51         @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS)
52
53 zap:    clean