47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
include build/Makefile.incl
|
|
|
|
dir = render
|
|
|
|
CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Render\"
|
|
|
|
target = libobrender.la
|
|
sources = color.c font.c gradient.c image.c mask.c render.c test.c
|
|
|
|
srcdir := $(srcdir)/$(dir)
|
|
target := $(addprefix $(dir)/, $(target))
|
|
objects := $(addprefix $(dir)/, $(sources:.c=.lo))
|
|
sources := $(addprefix $(srcdir)/, $(sources))
|
|
deps := $(addprefix $(depdir)/, $(objects:.lo=.d))
|
|
depdir := $(depdir)/$(dir)
|
|
|
|
all: $(target)
|
|
|
|
$(target): $(objects)
|
|
$(LINK) -rpath $(libdir) -o $@ $^ $(LDFLAGS)
|
|
|
|
$(dir)/%.lo: $(srcdir)/%.c $(depdir)/%.d
|
|
$(LTCOMPILE) -c -o $@ $<
|
|
|
|
$(depdir)/%.d: $(srcdir)/%.c
|
|
@echo Building dependancies for $<
|
|
@$(INSTALL) -d $(depdir)
|
|
@$(DEPCOMPILE) -w -MM -MF $@ -MQ $(<:.c=.o) $<
|
|
|
|
install:
|
|
$(INSTALL) -d $(DESTDIR)$(libdir)/
|
|
$(LIBTOOL) --mode=install $(INSTALL) $(target) \
|
|
$(DESTDIR)$(libdir)/$(notdir $(target))
|
|
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
|
|
|
|
uninstall:
|
|
$(LTRM) $(DESTDIR)$(libdir)/$(notdir $(target))
|
|
|
|
clean:
|
|
$(LTCLEAN) $(target) $(objects)
|
|
$(RM) $(srcdir)/*\~
|
|
|
|
distclean:
|
|
|
|
-include $(deps)
|
|
|
|
.PHONY: all install uninstall clean distclean
|