summaryrefslogtreecommitdiff
path: root/package/polarssl/patches/patch-library_Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/polarssl/patches/patch-library_Makefile')
-rw-r--r--package/polarssl/patches/patch-library_Makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/polarssl/patches/patch-library_Makefile b/package/polarssl/patches/patch-library_Makefile
new file mode 100644
index 000000000..84cc856c4
--- /dev/null
+++ b/package/polarssl/patches/patch-library_Makefile
@@ -0,0 +1,48 @@
+--- polarssl-1.2.8.orig/library/Makefile 2013-06-21 15:11:10.000000000 +0200
++++ polarssl-1.2.8/library/Makefile 2013-08-15 16:12:05.261471968 +0200
+@@ -18,9 +18,7 @@ endif
+ # CFLAGS += -D_BSD_EXTENSION
+
+ # To compile as a shared library:
+-ifdef SHARED
+ CFLAGS += -fPIC
+-endif
+
+ SONAME=libpolarssl.so.0
+
+@@ -51,26 +49,17 @@ OBJS= aes.o arc4.o asn1parse.o \
+ ssl_tls.o timing.o version.o \
+ x509parse.o x509write.o xtea.o
+
+-.SILENT:
+-
+-ifndef SHARED
+-all: static
+-else
+-all: shared
+-endif
++all: static shared
+
+ static: libpolarssl.a
+
+ shared: libpolarssl.$(DLEXT)
+
+ libpolarssl.a: $(OBJS)
+- echo " AR $@"
+ $(AR) r $@ $(OBJS)
+- echo " RL $@"
+ $(AR) s $@
+
+ libpolarssl.so: libpolarssl.a
+- echo " LD $@"
+ $(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS)
+
+ libpolarssl.dylib: libpolarssl.a
+@@ -82,7 +71,6 @@ libpolarssl.dll: libpolarssl.a
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32
+
+ .c.o:
+- echo " CC $<"
+ $(CC) $(CFLAGS) $(OFLAGS) -c $<
+
+ clean: