5f70a6acf04c425f52147b6739fe4b1665d49a75
[fw/altos] / src / draw / Makefile
1 TOPDIR=..
2 include $(TOPDIR)/Makefile.defs
3
4 vpath %.bdf fonts
5
6 BITMAP_SIZES = 10, 12, 14, 16, 18, 24, 26, 28, 32, 36, 48, 58, 60, 62, 64, 72
7
8 BDFS=\
9         BenguiatGothicStd-Bold-10.bdf \
10         BenguiatGothicStd-Bold-12.bdf \
11         BenguiatGothicStd-Bold-14.bdf \
12         BenguiatGothicStd-Bold-16.bdf \
13         BenguiatGothicStd-Bold-18.bdf \
14         BenguiatGothicStd-Bold-24.bdf \
15         BenguiatGothicStd-Bold-26.bdf \
16         BenguiatGothicStd-Bold-28.bdf \
17         BenguiatGothicStd-Bold-32.bdf \
18         BenguiatGothicStd-Bold-36.bdf \
19         BenguiatGothicStd-Bold-48.bdf \
20         BenguiatGothicStd-Bold-64.bdf \
21         BenguiatGothicStd-Bold-72.bdf \
22         BenguiatGothicStd-Medium-10.bdf \
23         BenguiatGothicStd-Medium-12.bdf \
24         BenguiatGothicStd-Medium-14.bdf \
25         BenguiatGothicStd-Medium-16.bdf \
26         BenguiatGothicStd-Medium-18.bdf \
27         BenguiatGothicStd-Medium-24.bdf \
28         BenguiatGothicStd-Medium-26.bdf \
29         BenguiatGothicStd-Medium-28.bdf \
30         BenguiatGothicStd-Medium-32.bdf \
31         BenguiatGothicStd-Medium-36.bdf \
32         BenguiatGothicStd-Medium-48.bdf \
33         BenguiatGothicStd-Medium-64.bdf \
34         BenguiatGothicStd-Medium-72.bdf \
35         BitstreamVeraSansMono-Roman-10.bdf \
36         BitstreamVeraSansMono-Roman-12.bdf \
37         BitstreamVeraSansMono-Roman-14.bdf \
38         BitstreamVeraSansMono-Roman-16.bdf \
39         BitstreamVeraSansMono-Roman-18.bdf \
40         BitstreamVeraSansMono-Roman-24.bdf \
41         BitstreamVeraSansMono-Roman-26.bdf \
42         BitstreamVeraSansMono-Roman-28.bdf \
43         BitstreamVeraSansMono-Roman-32.bdf \
44         BitstreamVeraSansMono-Roman-36.bdf \
45         BitstreamVeraSansMono-Roman-48.bdf \
46         BitstreamVeraSansMono-Roman-64.bdf \
47         BitstreamVeraSansMono-Roman-72.bdf \
48         BitstreamVeraSans-Roman-10.bdf \
49         BitstreamVeraSans-Roman-12.bdf \
50         BitstreamVeraSans-Roman-14.bdf \
51         BitstreamVeraSans-Roman-16.bdf \
52         BitstreamVeraSans-Roman-18.bdf \
53         BitstreamVeraSans-Roman-24.bdf \
54         BitstreamVeraSans-Roman-26.bdf \
55         BitstreamVeraSans-Roman-28.bdf \
56         BitstreamVeraSans-Roman-32.bdf \
57         BitstreamVeraSans-Roman-36.bdf \
58         BitstreamVeraSans-Roman-48.bdf \
59         BitstreamVeraSans-Roman-58.bdf \
60         BitstreamVeraSans-Roman-60.bdf \
61         BitstreamVeraSans-Roman-62.bdf \
62         BitstreamVeraSans-Roman-64.bdf \
63         BitstreamVeraSans-Roman-72.bdf \
64         FrutigerLT-Roman-10.bdf \
65         FrutigerLT-Roman-12.bdf \
66         FrutigerLT-Roman-14.bdf \
67         FrutigerLT-Roman-16.bdf \
68         FrutigerLT-Roman-18.bdf \
69         FrutigerLT-Roman-24.bdf \
70         FrutigerLT-Roman-26.bdf \
71         FrutigerLT-Roman-28.bdf \
72         FrutigerLT-Roman-32.bdf \
73         FrutigerLT-Roman-36.bdf \
74         FrutigerLT-Roman-48.bdf \
75         FrutigerLT-Roman-64.bdf \
76         FrutigerLT-Roman-72.bdf \
77         NotoMono-10.bdf \
78         NotoMono-12.bdf \
79         NotoMono-14.bdf \
80         NotoMono-16.bdf \
81         NotoMono-18.bdf \
82         NotoMono-24.bdf \
83         NotoMono-26.bdf \
84         NotoMono-28.bdf \
85         NotoMono-32.bdf \
86         NotoMono-36.bdf \
87         NotoMono-48.bdf \
88         NotoMono-64.bdf \
89         NotoMono-72.bdf
90
91 FONT_SRCS=$(BDFS:.bdf=.c)
92
93 .SUFFIXES: .bdf .c
94
95 .bdf.c:
96         nickle font-convert -o $@ $<
97
98 all: ao_font.h ao_logo.h lco-test line-test
99
100 $(FONT_SRCS): font-convert
101
102 ao_font.h: $(FONT_SRCS)
103         grep -h '^const struct ao_font' $(FONT_SRCS) | sed -e 's/^/extern /' -e 's/ =.*$$/;/' > $@
104
105 ao_logo.h: make-logo
106         nickle make-logo ao_logo > $@
107
108 LIB_SRCS=\
109         ao_blt.c \
110         ao_box.c \
111         ao_copy.c \
112         ao_line.c \
113         ao_pattern.c \
114         ao_rect.c \
115         ao_poly.c \
116         ao_text.c \
117         ao_logo.c \
118         $(FONT_SRCS)
119
120 LCO_TEST_SRCS=$(LIB_SRCS) lco-test.c
121 LCO_TEST_OBJS=$(LCO_TEST_SRCS:.c=.o)
122
123 LINE_TEST_SRCS=$(LIB_SRCS) line-test.c
124 LINE_TEST_OBJS=$(LINE_TEST_SRCS:.c=.o)
125
126 TEST_LIBS=-lXrender -lXext -lX11 -lm -Wl,--gc-sections
127
128 CFLAGS=-O0 -g $(WARN_FLAGS) -DVALIDATE -I.
129
130 HEADERS=\
131         ao_draw.h \
132         ao_draw_int.h \
133         ao_font.h \
134         ao_logo.h
135
136 lco-test: $(LCO_TEST_OBJS)
137         cc $(CFLAGS) -o $@ $(LCO_TEST_OBJS) $(TEST_LIBS)
138
139 lco-test.o: test-frame.c frame.c
140
141 $(LCO_TEST_OBJS): $(HEADERS)
142
143 line-test: $(LINE_TEST_OBJS)
144         cc $(CFLAGS) -o $@ $(LINE_TEST_OBJS) $(TEST_LIBS)
145
146 line-test.o: test-frame.c frame.c
147
148 $(LINE_TEST_OBJS): $(HEADERS)
149
150 clean:
151         rm -f $(LCO_TEST_OBJS) ao_font.h ao_logo.h $(FONT_SRCS)