X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=build%2FMakefile.render;h=178ba9715868be819593c97e5b552519bd6b9ffe;hb=b3ed490e8f4c438535a2cf6be1600242e1031440;hp=a16edeef62923d8d298a35b75a9a2efddbdd0add;hpb=8a4e27bdc362e3781ac947ff5536c1f0dbd3ba60;p=chaz%2Fopenbox diff --git a/build/Makefile.render b/build/Makefile.render index a16edeef..178ba971 100644 --- a/build/Makefile.render +++ b/build/Makefile.render @@ -4,35 +4,41 @@ 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 @echo Building dependancies for $< @$(INSTALL) -d $(depdir) - @$(DEPCOMPILE) -w -MM -MF $@ -MQ $(<:.c=.o) $< + @$(DEPCOMPILE) -w -MM -MF $@ -MQ $(<:.c=.lo) $< 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: