]> git.sur5r.net Git - cc65/blob - libsrc/vic20/Makefile
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
[cc65] / libsrc / vic20 / Makefile
1 #
2 # makefile for CC65 runtime library
3 #
4
5 .SUFFIXES: .o .s .c
6
7 #--------------------------------------------------------------------------
8 # Programs and flags
9
10 SYS = vic20
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) -t module -o $@ $^
31
32 %.joy:  %.o ../runtime/zeropage.o
33         @$(LD) -t module -o $@ $^
34
35 %.tgi:  %.o ../runtime/zeropage.o
36         @$(LD) -t module -o $@ $^
37
38 #--------------------------------------------------------------------------
39 # Object files
40
41 OBJS =  _scrsize.o      \
42         break.o         \
43         crt0.o          \
44         cgetc.o         \
45         clrscr.o        \
46         color.o         \
47         conio.o         \
48         cputc.o         \
49         get_tv.o        \
50         joy_stddrv.o    \
51         kbhit.o         \
52         kernal.o        \
53         kplot.o         \
54         mainargs.o      \
55         randomize.o     \
56         revers.o        \
57         sysuname.o
58
59 #--------------------------------------------------------------------------
60 # Drivers
61
62 EMDS =
63
64 JOYS = vic20-stdjoy.joy vic20-ptvjoy.joy
65
66 TGIS =
67
68 #--------------------------------------------------------------------------
69 # Targets
70
71 .PHONY: all clean zap
72
73 all:    $(OBJS) $(EMDS) $(JOYS) $(TGIS)
74
75 ../runtime/zeropage.o:
76         $(MAKE) -C $(dir $@) $(notdir $@)
77
78 clean:
79         @$(RM) $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
80
81 zap:    clean
82         @$(RM) $(EMDS) $(JOYS) $(TGIS)
83
84