X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=build%2FMakefile.render;h=6f99e5242f6a0ceebe00268985289cf03cc98a79;hb=09deadf727d3ad8e83a1716239adb642a64c9dd9;hp=a16edeef62923d8d298a35b75a9a2efddbdd0add;hpb=8a4e27bdc362e3781ac947ff5536c1f0dbd3ba60;p=chaz%2Fopenbox diff --git a/build/Makefile.render b/build/Makefile.render index a16edeef..6f99e524 100644 --- a/build/Makefile.render +++ b/build/Makefile.render @@ -4,22 +4,22 @@ dir = render CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Render\" -target = librender.a +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=.o)) +objects := $(addprefix $(dir)/, $(sources:.c=.lo)) sources := $(addprefix $(srcdir)/, $(sources)) -deps := $(addprefix $(depdir)/, $(objects:.o=.d)) +deps := $(addprefix $(depdir)/, $(objects:.lo=.d)) depdir := $(depdir)/$(dir) all: $(target) $(target): $(objects) - $(LINK) -static -o $@ $^ $(LDFLAGS) + $(LINK) -rpath $(libdir) -o $@ $^ $(LDFLAGS) -$(dir)/%.o: $(srcdir)/%.c $(depdir)/%.d +$(dir)/%.lo: $(srcdir)/%.c $(depdir)/%.d $(LTCOMPILE) -c -o $@ $< $(depdir)/%.d: $(srcdir)/%.c @@ -28,11 +28,17 @@ $(depdir)/%.d: $(srcdir)/%.c @$(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: - $(RM) $(target) $(objects) $(srcdir)/*\~ + $(LTCLEAN) $(target) $(objects) + $(RM) $(srcdir)/*\~ distclean: