]> git.sur5r.net Git - cc65/blob - libsrc/atmos/Makefile
Target-specific black & white values for use by the target-shared TGI kernel
[cc65] / libsrc / atmos / Makefile
1 #
2 # makefile for CC65 runtime library
3 #
4
5 .SUFFIXES: .o .s .c
6
7 #--------------------------------------------------------------------------
8 # Programs and flags
9
10 SYS     = atmos
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) -o $@ $(AFLAGS) $(*).s
25
26 %.o:    %.s
27         @$(AS) -g -o $@ $(AFLAGS) $<
28
29 %.emd:  %.o ../runtime/zeropage.o
30         @$(LD) -o $@ -t module $^
31
32 %.joy:  %.o ../runtime/zeropage.o
33         @$(LD) -o $@ -t module $^
34
35 %.mou:  %.o ../runtime/zeropage.o
36         @$(LD) -o $@ -t module $^
37
38 %.ser:  %.o ../runtime/zeropage.o
39         @$(LD) -o $@ -t module $^
40
41 %.tgi:  %.o ../runtime/zeropage.o
42         @$(LD) -o $@ -t module $^
43
44 #--------------------------------------------------------------------------
45 # Object files
46
47 OBJS  = _scrsize.o      \
48         cclear.o        \
49         cgetc.o         \
50         chline.o        \
51         clock.o         \
52         clrscr.o        \
53         color.o         \
54         cputc.o         \
55         crt0.o          \
56         ctype.o         \
57         cvline.o        \
58         gotox.o         \
59         gotoxy.o        \
60         gotoy.o         \
61         kbhit.o         \
62         mainargs.o      \
63         oserrlist.o     \
64         oserror.o       \
65         revers.o        \
66         systime.o       \
67         sysuname.o      \
68         tgi_colors.o    \
69         wherex.o        \
70         wherey.o        \
71         write.o
72
73 #--------------------------------------------------------------------------
74 # Drivers
75
76 EMDS =
77
78 JOYS = atmos-pase.joy
79
80 MOUS =
81
82 SERS =
83
84 TGIS = atmos-240-200-2.tgi
85
86 #--------------------------------------------------------------------------
87 # Targets
88
89 .PHONY: all clean zap
90
91 all:    $(OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
92
93 ../runtime/zeropage.o:
94         $(MAKE) -C $(dir $@) $(notdir $@)
95
96 clean:
97         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
98
99 zap:    clean
100         @$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
101
102