]> git.sur5r.net Git - cc65/blob - libsrc/em/Makefile
Ignore only top level directories.
[cc65] / libsrc / em / Makefile
1 #
2 # Makefile for the extended memory library
3 #
4
5 .SUFFIXES: .o .s .c
6
7 #--------------------------------------------------------------------------
8 # Programs and flags
9
10 SYS     = none
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../../asminc
17 CFLAGS  = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
18
19 #--------------------------------------------------------------------------
20 # Rules
21
22 %.o:    %.c
23         @$(CC) $(CFLAGS) $<
24         @$(AS) -g -o $@ $(AFLAGS) $(*).s
25
26 %.o:    %.s
27         @$(AS) -g -o $@ $(AFLAGS) $<
28
29 #--------------------------------------------------------------------------
30 # Object files
31
32 C_OBJS =
33
34 S_OBJS =        em-kernel.o     \
35                 em_commit.o     \
36                 em_copyto.o     \
37                 em_copyfrom.o   \
38                 em_load.o       \
39                 em_map.o        \
40                 em_pagecount.o  \
41                 em_unload.o     \
42                 em_use.o
43
44
45 #--------------------------------------------------------------------------
46 # Targets
47
48 .PHONY: all clean zap
49
50 all:    $(C_OBJS) $(S_OBJS)
51
52 clean:
53         @$(RM) *~ $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS)
54
55 zap:    clean
56