altos/draw: Add damage tracking
[fw/altos] / src / draw / Makefile
index 7eee1fe6ca80edab9abcb40dc5c3d3998c443e3c..93c10e42381721b360505c642c99d9bc5eaaa5f0 100644 (file)
@@ -57,7 +57,20 @@ BDFS=\
        FrutigerLT-Roman-36.bdf \
        FrutigerLT-Roman-48.bdf \
        FrutigerLT-Roman-64.bdf \
-       FrutigerLT-Roman-72.bdf
+       FrutigerLT-Roman-72.bdf \
+       NotoMono-10.bdf \
+       NotoMono-12.bdf \
+       NotoMono-14.bdf \
+       NotoMono-16.bdf \
+       NotoMono-18.bdf \
+       NotoMono-24.bdf \
+       NotoMono-26.bdf \
+       NotoMono-28.bdf \
+       NotoMono-32.bdf \
+       NotoMono-36.bdf \
+       NotoMono-48.bdf \
+       NotoMono-64.bdf \
+       NotoMono-72.bdf
 
 FONT_SRCS=$(BDFS:.bdf=.c)
 
@@ -66,19 +79,19 @@ FONT_SRCS=$(BDFS:.bdf=.c)
 .bdf.c:
        nickle font-convert -o $@ $<
 
-all: ao_font.h ao_logo.h draw-test
+all: ao_font.h ao_logo.h lco-test line-test
 
 $(FONT_SRCS): font-convert
 
 ao_font.h: $(FONT_SRCS)
        grep -h '^const struct ao_font' $(FONT_SRCS) | sed -e 's/^/extern /' -e 's/ =.*$$/;/' > $@
 
-ao_logo.h: make-logo Makefile
-       nickle make-logo ao_logo 48 0 10 > $@
+ao_logo.h: make-logo
+       nickle make-logo ao_logo > $@
 
-SRCS=\
-       draw-test.c \
+LIB_SRCS=\
        ao_blt.c \
+       ao_box.c \
        ao_copy.c \
        ao_line.c \
        ao_pattern.c \
@@ -88,11 +101,15 @@ SRCS=\
        ao_logo.c \
        $(FONT_SRCS)
 
-OBJS=$(SRCS:.c=.o)
+LCO_TEST_SRCS=$(LIB_SRCS) lco-test.c
+LCO_TEST_OBJS=$(LCO_TEST_SRCS:.c=.o)
 
-LIBS=-lXrender -lX11 -lm
+LINE_TEST_SRCS=$(LIB_SRCS) line-test.c
+LINE_TEST_OBJS=$(LINE_TEST_SRCS:.c=.o)
 
-CFLAGS=-O0 -g
+TEST_LIBS=-lXrender -lXext -lX11 -lm -Wl,--gc-sections
+
+CFLAGS=-O0 -g $(WARN_FLAGS) -DVALIDATE -I.
 
 HEADERS=\
        ao_draw.h \
@@ -100,10 +117,19 @@ HEADERS=\
        ao_font.h \
        ao_logo.h
 
-draw-test: $(OBJS)
-       cc $(CFLAGS) -o $@ $(OBJS) $(LIBS)
+lco-test: $(LCO_TEST_OBJS)
+       cc $(CFLAGS) -o $@ $(LCO_TEST_OBJS) $(TEST_LIBS)
+
+lco-test.o: test-frame.c frame.c
+
+$(LCO_TEST_OBJS): $(HEADERS)
+
+line-test: $(LINE_TEST_OBJS)
+       cc $(CFLAGS) -o $@ $(LINE_TEST_OBJS) $(TEST_LIBS)
+
+line-test.o: test-frame.c frame.c
 
-$(OBJS): $(HEADERS)
+$(LINE_TEST_OBJS): $(HEADERS)
 
 clean:
-       rm -f $(OBJS) ao_font.h ao_logo.h $(FONT_SRCS)
+       rm -f $(LCO_TEST_OBJS) ao_font.h ao_logo.h $(FONT_SRCS)