altos/draw: Add logo
[fw/altos] / src / draw / Makefile
1 BDFS=\
2         FrutigerLT-Roman-10.bdf \
3         FrutigerLT-Roman-12.bdf \
4         FrutigerLT-Roman-14.bdf \
5         FrutigerLT-Roman-18.bdf \
6         FrutigerLT-Roman-24.bdf \
7         FrutigerLT-Roman-36.bdf \
8         FrutigerLT-Roman-48.bdf \
9         FrutigerLT-Roman-64.bdf \
10
11 FONT_SRCS=$(BDFS:.bdf=.c)
12
13 .SUFFIXES: .bdf .c
14
15 .bdf.c:
16         nickle font-convert $*.bdf > $@
17
18 all: ao_font.h ao_logo.h draw-test
19
20 $(FONT_SRCS): font-convert
21
22 ao_font.h: $(FONT_SRCS)
23         grep -h '^const struct ao_font' $(FONT_SRCS) | sed -e 's/^/extern /' -e 's/ =.*$$/;/' > $@
24
25 ao_logo.h: make-logo Makefile
26         nickle make-logo ao_logo 48 0 10 > $@
27
28 SRCS=\
29         draw-test.c \
30         ao_blt.c \
31         ao_copy.c \
32         ao_line.c \
33         ao_pattern.c \
34         ao_rect.c \
35         ao_poly.c \
36         ao_text.c \
37         ao_logo.c \
38         $(FONT_SRCS)
39
40 OBJS=$(SRCS:.c=.o)
41
42 LIBS=-lXrender -lX11 -lm
43
44 CFLAGS=-O0 -g
45
46 HEADERS=\
47         ao_draw.h \
48         ao_draw_int.h \
49         ao_font.h \
50         ao_logo.h
51
52 draw-test: $(OBJS)
53         cc $(CFLAGS) -o $@ $(OBJS) $(LIBS)
54
55 $(OBJS): $(HEADERS)
56
57 clean:
58         rm -f $(OBJS) ao_font.h ao_logo.h $(FONT_SRCS)