]> git.sur5r.net Git - cc65/blob - libsrc/c64/Makefile
Fixed line endings I broke with recent change.
[cc65] / libsrc / c64 / Makefile
1 #
2 # makefile for CC65 runtime library
3 #
4
5 .SUFFIXES: .o .s .c
6
7
8 #--------------------------------------------------------------------------
9 # Programs and flags
10
11 SYS     = c64
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 %.emd:  %.o ../runtime/zeropage.o
31         @$(LD) -t module -o $@ $^
32
33 %.joy:  %.o ../runtime/zeropage.o
34         @$(LD) -t module -o $@ $^
35
36 %.mou:  %.o ../runtime/zeropage.o
37         @$(LD) -t module -o $@ $^
38
39 %.ser:  %.o ../runtime/zeropage.o
40         @$(LD) -t module -o $@ $^
41
42 %.tgi:  %.o ../runtime/zeropage.o
43         @$(LD) -t module -o $@ $^
44
45 #--------------------------------------------------------------------------
46 # Object files
47
48 OBJS =  _scrsize.o              \
49         break.o                 \
50         crt0.o                  \
51         cgetc.o                 \
52         clrscr.o                \
53         color.o                 \
54         conio.o                 \
55         cputc.o                 \
56         devnum.o                \
57         get_ostype.o            \
58         get_tv.o                \
59         joy_stddrv.o            \
60         kbhit.o                 \
61         kernal.o                \
62         kplot.o                 \
63         mainargs.o              \
64         mcbdefault.o            \
65         mouse_stddrv.o          \
66         randomize.o             \
67         revers.o                \
68         systime.o               \
69         sysuname.o              \
70         tgi_mode_table.o
71
72 #--------------------------------------------------------------------------
73 # Drivers
74
75 EMDS =  c64-c256k.emd           \
76         c64-dqbb.emd            \
77         c64-georam.emd          \
78         c64-isepic.emd          \
79         c64-ram.emd             \
80         c64-ramcart.emd         \
81         c64-reu.emd             \
82         c64-vdc.emd             \
83         dtv-himem.emd
84
85 JOYS =  c64-hitjoy.joy          \
86         c64-numpad.joy          \
87         c64-ptvjoy.joy          \
88         c64-stdjoy.joy
89
90 MOUS =  c64-1351.mou            \
91         c64-joymouse.mou        \
92         c64-potmouse.mou
93
94 SERS =  c64-swlink.ser
95
96 TGIS =  c64-320-200-2.tgi
97
98 #--------------------------------------------------------------------------
99 # Targets
100
101 .PHONY: all clean zap
102
103 all:    $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
104
105 ../runtime/zeropage.o:
106         $(MAKE) -C $(dir $@) $(notdir $@)
107
108 clean:
109         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
110
111 zap:    clean
112         @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
113