--- Makefile.orig 2016-02-29 01:15:13 UTC +++ Makefile @@ -1,9 +1,9 @@ VERSION=v2.4 -prefix=/usr/local +prefix=${PREFIX} -CC=$(CROSS_COMPILE)gcc -LD=$(CROSS_COMPILE)ld +#CC=$(CROSS_COMPILE)gcc +#LD=$(CROSS_COMPILE)ld SYS=posix #SYS=mingw @@ -21,8 +21,9 @@ CRYPTO_DEF=$(DEF_$(CRYPTO)) DEF=-DRTMPDUMP_VERSION=\"$(VERSION)\" $(CRYPTO_DEF) $(XDEF) OPT=-O2 -CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) -LDFLAGS=-Wall $(XLDFLAGS) +#CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) +CFLAGS+=$(DEF) +#LDFLAGS=-Wall $(XLDFLAGS) bindir=$(prefix)/bin sbindir=$(prefix)/sbin @@ -35,13 +36,13 @@ MANDIR=$(DESTDIR)$(mandir) LIBS_posix= LIBS_darwin= LIBS_mingw=-lws2_32 -lwinmm -lgdi32 -LIB_RTMP=-Llibrtmp -lrtmp +LIB_RTMP=-lrtmp LIBS=$(LIB_RTMP) $(CRYPTO_LIB) $(LIBS_$(SYS)) $(XLIBS) THREADLIB_posix=-lpthread THREADLIB_darwin=-lpthread THREADLIB_mingw= -THREADLIB=$(THREADLIB_$(SYS)) +THREADLIB?=$(THREADLIB_$(SYS)) SLIBS=$(THREADLIB) $(LIBS) LIBRTMP=librtmp/librtmp.a @@ -54,21 +55,17 @@ EXT=$(EXT_$(SYS)) PROGS=rtmpdump rtmpgw rtmpsrv rtmpsuck -all: $(LIBRTMP) $(PROGS) - -$(PROGS): $(LIBRTMP) +all: $(PROGS) install: $(PROGS) -mkdir -p $(BINDIR) $(SBINDIR) $(MANDIR)/man1 $(MANDIR)/man8 - cp rtmpdump$(EXT) $(BINDIR) - cp rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(SBINDIR) - cp rtmpdump.1 $(MANDIR)/man1 - cp rtmpgw.8 $(MANDIR)/man8 - @cd librtmp; $(MAKE) install + ${BSD_INSTALL_PROGRAM} rtmpdump$(EXT) $(BINDIR) + ${BSD_INSTALL_PROGRAM} rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(SBINDIR) + ${BSD_INSTALL_DATA} rtmpdump.1 $(MANDIR)/man1 + ${BSD_INSTALL_DATA} rtmpgw.8 $(MANDIR)/man8 clean: rm -f *.o rtmpdump$(EXT) rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) - @cd librtmp; $(MAKE) clean FORCE: