summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile')
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile
new file mode 100644
index 0000000..21a67b5
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile
@@ -0,0 +1,23 @@
+CC=gcc
+MYCFLAGS=-Wall -Winline -O2 -fPIC
+CFLAGS:=$(MYCFLAGS) $(CPPFLAGS) $(CFLAGS)
+
+SONAMES:= libany.so.1 libany6gcc.so.1v6 libany5gcc.so.1 libanyQ16.so.6
+LIBFILES:= $(patsubst %,%.0.1, $(SONAMES))
+
+all: $(LIBFILES)
+
+$(LIBFILES): code.o
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc
+
+clean:
+ rm -f *.a *.o *.so*
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0755 *.so* $(DESTDIR)/usr/lib
+ for FILE in $(SONAMES) ; do \
+ ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \
+ done
+
+.PHONY: install clean