]> git.sur5r.net Git - cc65/blob - libsrc/mouse/Makefile
Add definitions for tools so the makefile is useful by itself.
[cc65] / libsrc / mouse / Makefile
1 #
2 # Makefile for the mouse driver 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) -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 =        mouse_load.o
33
34 S_OBJS =        mouse-kernel.o  \
35                 mouse_box.o     \
36                 mouse_hide.o    \
37                 mouse_info.o    \
38                 mouse_ioctl.o   \
39                 mouse_move.o    \
40                 mouse_pos.o     \
41                 mouse_show.o    \
42                 mouse_unload.o
43
44 #--------------------------------------------------------------------------
45 # Targets
46
47 .PHONY: all clean zap
48
49 all:    $(C_OBJS) $(S_OBJS)
50
51 clean:
52         @$(RM) *~ $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS)
53
54 zap:    clean
55