swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit d80656905fc2f70a194b9541ffb640b3a0bd5bd7
parent f27bcd8fcea4ffdaf689317802127c06d7951e8f
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 25 Oct 2013 14:20:24 -0700

Revert "Make .so symlinks on install"

This reverts commit f27bcd8fcea4ffdaf689317802127c06d7951e8f.

We actually need the symlinks when building in case another program
links directly to the created libswc.so.

Diffstat:
Mlibswc/Makefile.local | 25+++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/libswc/Makefile.local b/libswc/Makefile.local @@ -11,7 +11,11 @@ $(dir)_TARGETS += $(dir)/libswc.a endif ifneq ($(ENABLE_SHARED), 0) -$(dir)_TARGETS += $(dir)/$(LIBSWC_LINK) +$(dir)_SHARED_TARGETS := \ + $(dir)/$(LIBSWC_LIB) \ + $(dir)/$(LIBSWC_SO) \ + $(dir)/$(LIBSWC_LINK) +$(dir)_TARGETS += libswc-shared endif SWC_SOURCES = \ @@ -64,16 +68,25 @@ $(dir)/drm.c $(dir)/drm_buffer.c: protocol/wayland-drm-server-protocol.h $(dir)/libswc.a: $(SWC_STATIC_OBJECTS) $(call quiet,AR) cru $@ $^ -$(dir)/$(LIBSWC_LINK): $(SWC_SHARED_OBJECTS) +$(dir)/$(LIBSWC_LIB): $(SWC_SHARED_OBJECTS) $(link) -shared -Wl,-soname,$(LIBSWC_SO) $(SWC_PACKAGE_LIBS) +$(dir)/$(LIBSWC_SO): $(dir)/$(LIBSWC_LIB) + $(call quiet,SYM,ln -sf) $(notdir $<) $@ + +$(dir)/$(LIBSWC_LINK): $(dir)/$(LIBSWC_SO) + $(call quiet,SYM,ln -sf) $(notdir $<) $@ + +.PHONY: libswc-shared +libswc-shared: $($(dir)_SHARED_TARGETS) + .PHONY: install-libswc.a install-libswc.a: $(dir)/libswc.a | $(DESTDIR)$(LIBDIR) install -m0644 $< "$(DESTDIR)$(LIBDIR)" -.PHONY: install-$(LIBSWC_LINK) -install-$(LIBSWC_LINK): $(dir)/$(LIBSWC_LINK) | $(DESTDIR)$(LIBDIR) - install -m0755 $< "$(DESTDIR)$(LIBDIR)/$(LIBSWC_LIB)" +.PHONY: install-libswc-shared +install-libswc-shared: $(dir)/$(LIBSWC_LIB) | $(DESTDIR)$(LIBDIR) + install -m0755 $< "$(DESTDIR)$(LIBDIR)" ln -sf $(LIBSWC_LIB) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_SO)" ln -sf $(LIBSWC_SO) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_LINK)" @@ -83,7 +96,7 @@ check-dependencies-libswc: install-libswc: $($(dir)_TARGETS:$(dir)/%=install-%) | $(DESTDIR)$(INCLUDEDIR) install -m0644 libswc/swc.h "$(DESTDIR)$(INCLUDEDIR)" -CLEAN_FILES += $(SWC_SHARED_OBJECTS) $(SWC_STATIC_OBJECTS) +CLEAN_FILES += $(SWC_SHARED_OBJECTS) $(SWC_STATIC_OBJECTS) $($(dir)_SHARED_TARGETS) include Makefile.common