summaryrefslogtreecommitdiffstats
path: root/multimedia/librtmp/files/patch-librtmp-Makefile
blob: 3aad9a44af774f7572d4d8f51ffc89ed3be584e1 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--- Makefile.orig	2016-02-29 01:15:13 UTC
+++ Makefile
@@ -1,19 +1,21 @@
 VERSION=v2.4
 
-prefix=/usr/local
+prefix=$(PREFIX)
 
 incdir=$(prefix)/include/librtmp
 bindir=$(prefix)/bin
 libdir=$(prefix)/lib
+libdatadir=$(prefix)/libdata
 mandir=$(prefix)/man
 BINDIR=$(DESTDIR)$(bindir)
 INCDIR=$(DESTDIR)$(incdir)
 LIBDIR=$(DESTDIR)$(libdir)
+LIBDATADIR=$(DESTDIR)$(libdatadir)
 MANDIR=$(DESTDIR)$(mandir)
 
-CC=$(CROSS_COMPILE)gcc
-LD=$(CROSS_COMPILE)ld
-AR=$(CROSS_COMPILE)ar
+CC?=$(CROSS_COMPILE)gcc
+LD?=$(CROSS_COMPILE)ld
+AR?=$(CROSS_COMPILE)ar
 
 SYS=posix
 CRYPTO=OPENSSL
@@ -23,14 +25,14 @@ DEF_OPENSSL=-DUSE_OPENSSL
 DEF_GNUTLS=-DUSE_GNUTLS
 DEF_=-DNO_CRYPTO
 REQ_GNUTLS=gnutls,hogweed,nettle
-REQ_OPENSSL=libssl,libcrypto
+#REQ_OPENSSL=libssl,libcrypto
 PUB_GNUTLS=-lgmp
 LIBZ=-lz
 LIBS_posix=
 LIBS_darwin=
 LIBS_mingw=-lws2_32 -lwinmm -lgdi32
 LIB_GNUTLS=-lgnutls -lhogweed -lnettle -lgmp $(LIBZ)
-LIB_OPENSSL=-lssl -lcrypto $(LIBZ)
+LIB_OPENSSL=-L$(OPENSSLLIB) -lssl -lcrypto $(LIBZ)
 LIB_POLARSSL=-lpolarssl $(LIBZ)
 PRIVATE_LIBS=$(LIBS_$(SYS))
 CRYPTO_LIB=$(LIB_$(CRYPTO)) $(PRIVATE_LIBS)
@@ -74,8 +76,9 @@ SO_INST=$(SOINST_$(SHARED))
 
 DEF=-DRTMPDUMP_VERSION=\"$(VERSION)\" $(CRYPTO_DEF) $(XDEF)
 OPT=-O2
-CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) $(SO_DEF)
-LDFLAGS=$(XLDFLAGS)
+#CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) $(SO_DEF)
+CFLAGS+=$(DEF) $(SO_DEF)
+#LDFLAGS=$(XLDFLAGS)
 
 
 OBJS=rtmp.o log.o amf.o hashswf.o parseurl.o
@@ -102,20 +105,22 @@ librtmp.pc: librtmp.pc.in Makefile
 	sed -e "s;@prefix@;$(prefix);" -e "s;@libdir@;$(libdir);" \
 		-e "s;@VERSION@;$(VERSION);" \
 		-e "s;@CRYPTO_REQ@;$(CRYPTO_REQ);" \
+		-e "s;@OPENSSLLIB@;$(OPENSSLLIB);" \
+		-e "s;@OPENSSLINC@;$(OPENSSLINC);" \
 		-e "s;@PUBLIC_LIBS@;$(PUBLIC_LIBS);" \
 		-e "s;@PRIVATE_LIBS@;$(PRIVATE_LIBS);" librtmp.pc.in > $@
 
 install:	install_base $(SO_INST)
 
 install_base:	librtmp.a librtmp.pc
-	-mkdir -p $(INCDIR) $(LIBDIR)/pkgconfig $(MANDIR)/man3 $(SODIR)
+	-mkdir -p $(INCDIR) $(LIBDATADIR)/pkgconfig $(MANDIR)/man3 $(SODIR)
 	cp amf.h http.h log.h rtmp.h $(INCDIR)
 	cp librtmp.a $(LIBDIR)
-	cp librtmp.pc $(LIBDIR)/pkgconfig
+	cp librtmp.pc $(LIBDATADIR)/pkgconfig
 	cp librtmp.3 $(MANDIR)/man3
 
 install_so:	librtmp$(SO_EXT)
-	cp librtmp$(SO_EXT) $(SODIR)
+	${BSD_INSTALL_LIB} librtmp$(SO_EXT) $(SODIR)
 	$(INSTALL_IMPLIB)
 	cd $(SODIR); ln -sf librtmp$(SO_EXT) librtmp.$(SOX)
 
OpenPOWER on IntegriCloud