more build fixes
[dana/openbox.git] / build / Makefile.render
1 render_dir:=render
2 render_target:=librender.a
3 render_sources:=color.c font.c gradient.c image.c mask.c render.c test.c
4 render_CPPFLAGS:=$(CPPFLAGS) $(GLIB_CFLAGS) $(XFT_CFLAGS) \
5   -DG_LOG_DOMAIN=\"Render\"
6
7 render_srcdir:=$(srcdir)/$(render_dir)
8 render_target:=$(addprefix $(render_dir)/,$(render_target))
9 render_objects:=$(addprefix $(render_dir)/,$(render_sources:.c=.o))
10 render_sources:=$(addprefix $(render_srcdir)/,$(render_sources))
11 render_deps:=$(addprefix $(depdir)/,$(render_objects:.o=.d))
12 render_depdir:=$(depdir)/$(render_dir)
13
14 $(render_target): $(render_objects)
15         $(AR) r $@ $^
16
17 $(render_dir):
18         @mkdir $@
19
20 $(render_dir)/%.o: $(render_srcdir)/%.c $(depdir)/%.d
21         $(CC) $(DEFS) $(render_CPPFLAGS) $(CFLAGS) -c -o $@ $<
22
23 $(render_depdir)/%.d: $(render_srcdir)/%.c
24         @echo Building dependancies for $<
25         $(INSTALL) -d $(dir $@)
26         @$(CC) $(render_CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.o) $<
27
28 render-install:
29
30 render-uninstall:
31
32 render-clean:
33         $(RM) $(render_target) $(render_objects) $(render_srcdir)/*\~
34
35 -include $(render_deps)
36
37 .PHONY: render-install render-uninstall render-clean