78 lines
2.2 KiB
Text
78 lines
2.2 KiB
Text
--- Makefile.orig 2013-10-07 03:52:05.000000000 +0900
|
|
+++ Makefile 2013-10-30 05:16:36.000000000 +0900
|
|
@@ -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_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 @@
|
|
|
|
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,16 +105,18 @@
|
|
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)
|