projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Fill in more of the draw code
[fw/altos]
/
src
/
draw
/
Makefile
diff --git
a/src/draw/Makefile
b/src/draw/Makefile
index 0a542a1f7df16e19b474eadad210b538e59d5d13..d64e40debb033400fb32c43a4e377c177563a45a 100644
(file)
--- a/
src/draw/Makefile
+++ b/
src/draw/Makefile
@@
-1,4
+1,52
@@
-BDF=5x7.bdf
+BDFS=\
+ FrutigerLT-Roman-10.bdf \
+ FrutigerLT-Roman-12.bdf \
+ FrutigerLT-Roman-14.bdf \
+ FrutigerLT-Roman-18.bdf \
+ FrutigerLT-Roman-24.bdf \
+ FrutigerLT-Roman-36.bdf \
+ FrutigerLT-Roman-48.bdf \
+ FrutigerLT-Roman-64.bdf \
-ao_font.h: font-convert $(BDF)
- nickle font-convert $(BDF) > $@
+FONT_SRCS=$(BDFS:.bdf=.c)
+
+.SUFFIXES: .bdf .c
+
+.bdf.c:
+ nickle font-convert $*.bdf > $@
+
+all: ao_font.h draw-test
+
+$(FONT_SRCS): font-convert
+
+ao_font.h: $(FONT_SRCS)
+ grep -h '^const struct ao_font' $(FONT_SRCS) | sed -e 's/^/extern /' -e 's/ =.*$$/;/' > $@
+
+SRCS=\
+ draw-test.c \
+ ao_blt.c \
+ ao_copy.c \
+ ao_line.c \
+ ao_pattern.c \
+ ao_rect.c \
+ ao_text.c \
+ $(FONT_SRCS)
+
+OBJS=$(SRCS:.c=.o)
+
+LIBS=-lXrender -lX11
+
+CFLAGS=-O0 -g
+
+HEADERS=\
+ ao_draw.h \
+ ao_draw_int.h \
+ ao_font.h
+
+draw-test: $(OBJS)
+ cc $(CFLAGS) -o $@ $(OBJS) $(LIBS)
+
+$(OBJS): $(HEADERS)
+
+clean:
+ rm -f $(OBJS) ao_font.h $(FONT_SRCS)