summaryrefslogtreecommitdiff
path: root/package/polarssl/patches/patch-library_Makefile
blob: edb0791b771fdf124dcb33d1e0227bf4ef2c6537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- polarssl-1.2.8.orig/library/Makefile	2013-06-21 15:11:10.000000000 +0200
+++ polarssl-1.2.8/library/Makefile	2013-08-20 18:32:08.885495858 +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,27 +49,19 @@ 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)
+	ln -sf $@ $(SONAME)
 
 libpolarssl.dylib: libpolarssl.a
 	echo "  LD    $@"
@@ -82,7 +72,6 @@ libpolarssl.dll: libpolarssl.a
 	$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32 
 
 .c.o:
-	echo "  CC    $<"
 	$(CC) $(CFLAGS) $(OFLAGS) -c $<
 
 clean: