d64e40debb033400fb32c43a4e377c177563a45a
[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 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 SRCS=\
26         draw-test.c \
27         ao_blt.c \
28         ao_copy.c \
29         ao_line.c \
30         ao_pattern.c \
31         ao_rect.c \
32         ao_text.c \
33         $(FONT_SRCS)
34
35 OBJS=$(SRCS:.c=.o)
36
37 LIBS=-lXrender -lX11
38
39 CFLAGS=-O0 -g
40
41 HEADERS=\
42         ao_draw.h \
43         ao_draw_int.h \
44         ao_font.h
45
46 draw-test: $(OBJS)
47         cc $(CFLAGS) -o $@ $(OBJS) $(LIBS)
48
49 $(OBJS): $(HEADERS)
50
51 clean:
52         rm -f $(OBJS) ao_font.h $(FONT_SRCS)