commit d806569

Michael Forney  ·  2013-10-25 21:20:24 +0000 UTC
parent f27bcd8
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.
1 files changed,  +19, -6
+19, -6
 1@@ -11,7 +11,11 @@ $(dir)_TARGETS += $(dir)/libswc.a
 2 endif
 3 
 4 ifneq ($(ENABLE_SHARED), 0)
 5-$(dir)_TARGETS += $(dir)/$(LIBSWC_LINK)
 6+$(dir)_SHARED_TARGETS :=            \
 7+    $(dir)/$(LIBSWC_LIB)            \
 8+    $(dir)/$(LIBSWC_SO)             \
 9+    $(dir)/$(LIBSWC_LINK)
10+$(dir)_TARGETS += libswc-shared
11 endif
12 
13 SWC_SOURCES =                       \
14@@ -64,16 +68,25 @@ $(dir)/drm.c $(dir)/drm_buffer.c: protocol/wayland-drm-server-protocol.h
15 $(dir)/libswc.a: $(SWC_STATIC_OBJECTS)
16 	$(call quiet,AR) cru $@ $^
17 
18-$(dir)/$(LIBSWC_LINK): $(SWC_SHARED_OBJECTS)
19+$(dir)/$(LIBSWC_LIB): $(SWC_SHARED_OBJECTS)
20 	$(link) -shared -Wl,-soname,$(LIBSWC_SO) $(SWC_PACKAGE_LIBS)
21 
22+$(dir)/$(LIBSWC_SO): $(dir)/$(LIBSWC_LIB)
23+	$(call quiet,SYM,ln -sf) $(notdir $<) $@
24+
25+$(dir)/$(LIBSWC_LINK): $(dir)/$(LIBSWC_SO)
26+	$(call quiet,SYM,ln -sf) $(notdir $<) $@
27+
28+.PHONY: libswc-shared
29+libswc-shared: $($(dir)_SHARED_TARGETS)
30+
31 .PHONY: install-libswc.a
32 install-libswc.a: $(dir)/libswc.a | $(DESTDIR)$(LIBDIR)
33 	install -m0644 $< "$(DESTDIR)$(LIBDIR)"
34 
35-.PHONY: install-$(LIBSWC_LINK)
36-install-$(LIBSWC_LINK): $(dir)/$(LIBSWC_LINK) | $(DESTDIR)$(LIBDIR)
37-	install -m0755 $< "$(DESTDIR)$(LIBDIR)/$(LIBSWC_LIB)"
38+.PHONY: install-libswc-shared
39+install-libswc-shared: $(dir)/$(LIBSWC_LIB) | $(DESTDIR)$(LIBDIR)
40+	install -m0755 $< "$(DESTDIR)$(LIBDIR)"
41 	ln -sf $(LIBSWC_LIB) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_SO)"
42 	ln -sf $(LIBSWC_SO) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_LINK)"
43 
44@@ -83,7 +96,7 @@ check-dependencies-libswc:
45 install-libswc: $($(dir)_TARGETS:$(dir)/%=install-%) | $(DESTDIR)$(INCLUDEDIR)
46 	install -m0644 libswc/swc.h "$(DESTDIR)$(INCLUDEDIR)"
47 
48-CLEAN_FILES += $(SWC_SHARED_OBJECTS) $(SWC_STATIC_OBJECTS)
49+CLEAN_FILES += $(SWC_SHARED_OBJECTS) $(SWC_STATIC_OBJECTS) $($(dir)_SHARED_TARGETS)
50 
51 include Makefile.common
52