c2e72bcda0b5522ddaae7d2ea638558e4e27da6a
[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, 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         FrutigerLT-Roman-10.bdf \
36         FrutigerLT-Roman-12.bdf \
37         FrutigerLT-Roman-14.bdf \
38         FrutigerLT-Roman-16.bdf \
39         FrutigerLT-Roman-18.bdf \
40         FrutigerLT-Roman-24.bdf \
41         FrutigerLT-Roman-26.bdf \
42         FrutigerLT-Roman-28.bdf \
43         FrutigerLT-Roman-32.bdf \
44         FrutigerLT-Roman-36.bdf \
45         FrutigerLT-Roman-48.bdf \
46         FrutigerLT-Roman-64.bdf \
47         FrutigerLT-Roman-72.bdf
48
49 FONT_SRCS=$(BDFS:.bdf=.c)
50
51 .SUFFIXES: .bdf .c
52
53 .bdf.c:
54         nickle font-convert -o $@ $<
55
56 all: ao_font.h ao_logo.h draw-test
57
58 $(FONT_SRCS): font-convert
59
60 ao_font.h: $(FONT_SRCS)
61         grep -h '^const struct ao_font' $(FONT_SRCS) | sed -e 's/^/extern /' -e 's/ =.*$$/;/' > $@
62
63 ao_logo.h: make-logo Makefile
64         nickle make-logo ao_logo 48 0 10 > $@
65
66 SRCS=\
67         draw-test.c \
68         ao_blt.c \
69         ao_copy.c \
70         ao_line.c \
71         ao_pattern.c \
72         ao_rect.c \
73         ao_poly.c \
74         ao_text.c \
75         ao_logo.c \
76         $(FONT_SRCS)
77
78 OBJS=$(SRCS:.c=.o)
79
80 LIBS=-lXrender -lX11 -lm
81
82 CFLAGS=-O0 -g
83
84 HEADERS=\
85         ao_draw.h \
86         ao_draw_int.h \
87         ao_font.h \
88         ao_logo.h
89
90 draw-test: $(OBJS)
91         cc $(CFLAGS) -o $@ $(OBJS) $(LIBS)
92
93 $(OBJS): $(HEADERS)
94
95 clean:
96         rm -f $(OBJS) ao_font.h ao_logo.h $(FONT_SRCS)