slackbuilds_ponce/libraries/libb64/shared-library.patch
Larry Hajali 9b35a6da20 libraries/libb64: Added (C routines for base64 encoding/decoding)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2015-11-14 07:07:34 +07:00

25 lines
534 B
Diff

--- src/Makefile~
+++ src/Makefile
@@ -1,4 +1,5 @@
-LIBRARIES = libb64.a
+LIBRARIES = libb64.a libb64.so
+SOVERSION ?= 0
# Build flags (uncomment one)
#############################
@@ -27,6 +28,15 @@ all: $(TARGETS) #strip
libb64.a: cencode.o cdecode.o
$(AR) $(ARFLAGS) $@ $^
+libb64.so.$(SOVERSION): cencode.So cdecode.So
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
+
+%.So: %.c
+ $(CC) -fPIC -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+
+%.so: %.so.$(SOVERSION)
+ ln -fs $< $@
+
strip:
strip $(BINARIES) *.exe