]> git.sur5r.net Git - cc65/blob - libsrc/tgi/Makefile
bc3da90928181b50943c2935565fdfbe93e080cb
[cc65] / libsrc / tgi / Makefile
1 #
2 # Makefile for the TGI graphics kernel
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 =        tgi_load.o
33
34 S_OBJS =        tgi-kernel.o            \
35                 tgi_bar.o               \
36                 tgi_circle.o            \
37                 tgi_clear.o             \
38                 tgi_curtoxy.o           \
39                 tgi_done.o              \
40                 tgi_getcolor.o          \
41                 tgi_getcolorcount.o     \
42                 tgi_getdefpalette.o     \
43                 tgi_geterror.o          \
44                 tgi_geterrormsg.o       \
45                 tgi_getmaxcolor.o       \
46                 tgi_getmaxx.o           \
47                 tgi_getmaxy.o           \
48                 tgi_getpagecount.o      \
49                 tgi_getpalette.o        \
50                 tgi_getpixel.o          \
51                 tgi_getset.o            \
52                 tgi_getxres.o           \
53                 tgi_getyres.o           \
54                 tgi_gotoxy.o            \
55                 tgi_init.o              \
56                 tgi_ioctl.o             \
57                 tgi_line.o              \
58                 tgi_linepop.o           \
59                 tgi_lineto.o            \
60                 tgi_map_mode.o          \
61                 tgi_outtext.o           \
62                 tgi_outtextxy.o         \
63                 tgi_popxy.o             \
64                 tgi_popxy2.o            \
65                 tgi_setcolor.o          \
66                 tgi_setdrawpage.o       \
67                 tgi_setpalette.o        \
68                 tgi_setpixel.o          \
69                 tgi_setviewpage.o       \
70                 tgi_textsize.o          \
71                 tgi_textstyle.o         \
72                 tgi_unload.o
73
74
75 #--------------------------------------------------------------------------
76 # Targets
77
78 .PHONY: all clean zap
79
80 all:    $(C_OBJS) $(S_OBJS)
81
82 clean:
83         @$(RM) *~ $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS)
84
85 zap:    clean
86