r490 - in trunk: Makefile README librtmp/Makefile
Author: hyc Date: Sat May 29 09:26:00 2010 New Revision: 490 Log: Makefile tweaks, use SYS= macro instead of platform targets Modified: trunk/Makefile trunk/README trunk/librtmp/Makefile Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sat May 29 08:55:46 2010 (r489) +++ trunk/Makefile Sat May 29 09:26:00 2010 (r490) @@ -3,6 +3,9 @@ VERSION=v2.2e CC=$(CROSS_COMPILE)gcc LD=$(CROSS_COMPILE)ld +SYS=posix +#SYS=mingw + CRYPTO=OPENSSL #CRYPTO=POLARSSL #CRYPTO=GNUTLS @@ -18,34 +21,26 @@ OPT=-O2 CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) LDFLAGS=-Wall $(XLDFLAGS) -LIBS=$(CRYPTO_LIB) -lz -THREADLIB=-lpthread +LIBS_posix= +LIBS_mingw=-lws2_32 -lwinmm -lgdi32 +LIBS=$(CRYPTO_LIB) -lz $(LIBS_$(SYS)) + +THREADLIB_posix=-lpthread +THREADLIB_mingw= +THREADLIB=$(THREADLIB_$(SYS)) SLIBS=$(THREADLIB) $(LIBS) LIBRTMP=librtmp/librtmp.a INCRTMP=librtmp/rtmp_sys.h librtmp/rtmp.h librtmp/log.h librtmp/amf.h -EXT= +EXT_posix= +EXT_mingw=.exe +EXT=$(EXT_$(SYS)) -all: - @echo 'use "make posix" for a native Linux/Unix build, or' - @echo ' "make mingw" for a MinGW32 build' - @echo 'use commandline overrides if you want anything else' +all: $(LIBRTMP) progs progs: rtmpdump rtmpgw rtmpsrv rtmpsuck -posix linux unix osx: - @$(MAKE) $(MAKEFLAGS) MF="$(MAKEFLAGS)" progs - -mingw: - @$(MAKE) CROSS_COMPILE=mingw32- LIBS="$(LIBS) -lws2_32 -lwinmm -lgdi32" THREADLIB= EXT=.exe $(MAKEFLAGS) progs - -cygwin: - @$(MAKE) XCFLAGS=-static XLDFLAGS="-static-libgcc -static" EXT=.exe $(MAKEFLAGS) progs - -cross: - @$(MAKE) CROSS_COMPILE=armv7a-angstrom-linux-gnueabi- INC=-I$(STAGING)/usr/include $(MAKEFLAGS) progs - clean: rm -f *.o rtmpdump$(EXT) rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) @cd librtmp; $(MAKE) clean Modified: trunk/README ============================================================================== --- trunk/README Sat May 29 08:55:46 2010 (r489) +++ trunk/README Sat May 29 09:26:00 2010 (r490) @@ -1,27 +1,23 @@ -RTMP Dump v2.2d +RTMP Dump v2.2e (C) 2009 Andrej Stepanchuk (C) 2009-2010 Howard Chu (C) 2010 2a665470ced7adb7156fcef47f8199a6371c117b8a79e399a2771e0b36384090 License: GPLv2 http://rtmpdump.mplayerhq.hu/ -To compile type "make" with platform name, e.g. +To compile type "make" with SYS=<platform name>, e.g. - $ make posix + $ make SYS=posix for Linux, MacOSX, Unix, etc. or - $ make mingw + $ make SYS=mingw for Windows. -You can cross-compile for other platforms using - - $ make cross - -but you may need to override the CROSS_COMPILE and INC variables, e.g. +You can cross-compile for other platforms using the CROSS_COMPILE variable: - $ make arm CROSS_COMPILE=arm-none-linux- INC=-I/my/cross/includes + $ make CROSS_COMPILE=arm-none-linux- INC=-I/my/cross/includes Please read the Makefile to see what other make variables are used. @@ -30,15 +26,15 @@ optionally use GnuTLS or polarssl instea also build with just rtmpe support, and no rtmps/https support, by specifying -DNO_SSL in the XDEF macro, e.g. - $ make posix XDEF=-DNO_SSL + $ make XDEF=-DNO_SSL or - $ make posix CRYPTO=POLARSSL XDEF=-DNO_SSL + $ make CRYPTO=POLARSSL XDEF=-DNO_SSL You may also turn off all crypto support if desired - $ make posix CRYPTO= + $ make CRYPTO= Note that if using OpenSSL, you must have version 0.9.8 or newer. Modified: trunk/librtmp/Makefile ============================================================================== --- trunk/librtmp/Makefile Sat May 29 08:55:46 2010 (r489) +++ trunk/librtmp/Makefile Sat May 29 09:26:00 2010 (r490) @@ -22,6 +22,7 @@ OPT=-O2 CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) INCDIR=$(DESTDIR)$(prefix)/include/librtmp +LIBDIR=$(DESTDIR)$(prefix)/lib all: librtmp.a @@ -42,7 +43,7 @@ librtmp.pc: librtmp.pc.in Makefile -e "s;@CRYPTO_REQ@;$(CRYPTO_REQ);" librtmp.pc.in > $@ install: librtmp.a librtmp.pc - -mkdir -p $(INCDIR) $(DESTDIR)$(prefix)/lib/pkgconfig + -mkdir -p $(INCDIR) $(LIBDIR)/pkgconfig cp amf.h http.h log.h rtmp.h $(INCDIR) - cp librtmp.a $(DESTDIR)$(prefix)/lib - cp librtmp.pc $(DESTDIR)$(prefix)/lib/pkgconfig + cp librtmp.a $(LIBDIR) + cp librtmp.pc $(LIBDIR)/pkgconfig
participants (1)
-
hyc