]> git.sur5r.net Git - cc65/blob - libsrc/conio/Makefile
7a3fa77e24839a33aa94f11b53c5492672142948
[cc65] / libsrc / conio / Makefile
1 # -*- makefile -*-
2 #
3 # makefile for CC65's console library
4 #
5
6 .SUFFIXES: .o .s .c
7
8 #--------------------------------------------------------------------------
9 # Programs and flags
10
11 SYS     = none
12
13 AS      = ../../src/ca65/ca65
14 CC      = ../../src/cc65/cc65
15 LD      = ../../src/ld65/ld65
16
17 AFLAGS  = -t $(SYS) --forget-inc-paths -I../../asminc
18 CFLAGS  = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
19
20 #--------------------------------------------------------------------------
21 # Rules
22
23 %.o:    %.c
24         @$(CC) $(CFLAGS) $<
25         @$(AS) -o $@ $(AFLAGS) $(*).s
26
27 %.o:    %.s
28         @$(AS) -g -o $@ $(AFLAGS) $<
29
30 #--------------------------------------------------------------------------
31 # Rules to help us see what code the compiler and assembler make.
32
33 #%.s :  %.c
34 #       @$(CC) $(CFLAGS) -S $<
35
36 %.lst : %.s
37         @$(AS) $(AFLAGS) -l -o /dev/null $<
38
39 #--------------------------------------------------------------------------
40 # Object files
41
42 OBJS =  _cursor.o       \
43         cprintf.o       \
44         cputhex.o       \
45         cputs.o         \
46         cscanf.o        \
47         cursor.o        \
48         scrsize.o       \
49         vcprintf.o      \
50         vcscanf.o
51
52 #--------------------------------------------------------------------------
53 # Targets
54
55 .PHONY: all clean zap
56
57 all:    $(OBJS)
58
59 clean:
60         @$(RM) *~ *.lst $(OBJS)
61
62 zap:    clean
63