Index: rtmpdump-2.3/Makefile
===================================================================
--- rtmpdump-2.3.orig/Makefile
+++ rtmpdump-2.3/Makefile
@@ -1,6 +1,6 @@
 VERSION=v2.3
 
-prefix=/usr/local
+prefix=/usr
 
 CC=$(CROSS_COMPILE)gcc
 LD=$(CROSS_COMPILE)ld
@@ -24,14 +24,14 @@ CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(
 LDFLAGS=-Wall $(XLDFLAGS)
 
 bindir=$(prefix)/bin
-mandir=$(prefix)/man
+mandir=$(prefix)/share/man
 
 BINDIR=$(DESTDIR)$(bindir)
 MANDIR=$(DESTDIR)$(mandir)
 
 LIBS_posix=
 LIBS_mingw=-lws2_32 -lwinmm -lgdi32
-LIBS=$(CRYPTO_LIB) -lz $(LIBS_$(SYS)) $(XLIBS)
+LIBS=-L librtmp -lrtmp $(CRYPTO_LIB) -lz $(LIBS_$(SYS)) $(XLIBS)
 
 THREADLIB_posix=-lpthread
 THREADLIB_mingw=
@@ -45,11 +45,13 @@ EXT_posix=
 EXT_mingw=.exe
 EXT=$(EXT_$(SYS))
 
-all:	$(LIBRTMP) progs
+PROGS=rtmpdump rtmpgw rtmpsrv rtmpsuck
 
-progs:	rtmpdump rtmpgw rtmpsrv rtmpsuck
+all:	$(LIBRTMP) $(PROGS)
 
-install:	progs
+$(PROGS): $(LIBRTMP)
+
+install:	$(PROGS)
 	-mkdir -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man8
 	cp rtmpdump$(EXT) rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(BINDIR)
 	cp rtmpdump.1 $(MANDIR)/man1
@@ -65,20 +67,17 @@ FORCE:
 $(LIBRTMP): FORCE
 	@cd librtmp; $(MAKE) all
 
-# note: $^ is GNU Make's equivalent to BSD $>
-# we use both since either make will ignore the one it doesn't recognize
-
-rtmpdump: rtmpdump.o $(LIBRTMP)
-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(LIBS)
+rtmpdump: rtmpdump.o
+	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o $(LIBS)
 
-rtmpsrv: rtmpsrv.o thread.o $(LIBRTMP)
-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(SLIBS)
+rtmpsrv: rtmpsrv.o thread.o
+	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o thread.o $(SLIBS)
 
-rtmpsuck: rtmpsuck.o thread.o $(LIBRTMP)
-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(SLIBS)
+rtmpsuck: rtmpsuck.o thread.o
+	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o thread.o $(SLIBS)
 
-rtmpgw: rtmpgw.o thread.o $(LIBRTMP)
-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(SLIBS)
+rtmpgw: rtmpgw.o thread.o
+	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o thread.o $(SLIBS)
 
 rtmpgw.o: rtmpgw.c $(INCRTMP) Makefile
 rtmpdump.o: rtmpdump.c $(INCRTMP) Makefile
Index: rtmpdump-2.3/librtmp/Makefile
===================================================================
--- rtmpdump-2.3.orig/librtmp/Makefile
+++ rtmpdump-2.3/librtmp/Makefile
@@ -1,6 +1,6 @@
 VERSION=v2.3
 
-prefix=/usr/local
+prefix=/usr
 
 CC=$(CROSS_COMPILE)gcc
 LD=$(CROSS_COMPILE)ld
@@ -44,7 +44,7 @@ CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(
 incdir=$(prefix)/include/librtmp
 bindir=$(prefix)/bin
 libdir=$(prefix)/lib
-mandir=$(prefix)/man
+mandir=$(prefix)/share/man
 BINDIR=$(DESTDIR)$(bindir)
 INCDIR=$(DESTDIR)$(incdir)
 LIBDIR=$(DESTDIR)$(libdir)
