Index: Makefile
--- Makefile.orig	2014-07-06 21:15:00.000000000 +0200
+++ Makefile	2014-07-06 21:20:38.212203777 +0200
@@ -1,30 +1,9 @@
 
-ifeq (${AMQPTOOLS_RABBITHOME},)
-    AMQPTOOLS_RABBITHOME = "/usr/local/src/rabbitmq/rabbitmq-c"
-endif
-
-ifeq (${AMQPTOOLS_INSTALLROOT},)
-    AMQPTOOLS_INSTALLROOT = "/usr/local/bin"
-endif
-
-
-all: clean build
-
-build: amqpspawn amqpsend
-
-install: bin/amqpspawn bin/amqpsend
-	install -D -m0755 bin/amqpspawn $(AMQPTOOLS_INSTALLROOT)/amqpspawn
-	install -D -m0755 bin/amqpsend $(AMQPTOOLS_INSTALLROOT)/amqpsend
-
-uninstall:
-	rm -f $(AMQPTOOLS_INSTALLROOT)/amqpspawn
-	rm -f $(AMQPTOOLS_INSTALLROOT)/amqpsend
+all: amqpspawn amqpsend
 
 amqpspawn: amqpspawn.c
-	gcc -o bin/amqpspawn amqpspawn.c -I$(AMQPTOOLS_RABBITHOME)/librabbitmq $(AMQPTOOLS_RABBITHOME)/librabbitmq/.libs/librabbitmq.so
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o amqpspawn amqpspawn.c $(LIBS)
 
 amqpsend: amqpsend.c
-	gcc -o bin/amqpsend amqpsend.c -I$(AMQPTOOLS_RABBITHOME)/librabbitmq $(AMQPTOOLS_RABBITHOME)/librabbitmq/.libs/librabbitmq.so
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o amqpsend amqpsend.c $(LIBS)
 
-clean:
-	rm -f bin/amqpsend bin/amqpspawn
Index: amqpsend.c
--- amqpsend.c.orig	2014-07-06 21:15:00.000000000 +0200
+++ amqpsend.c	2014-07-06 21:21:43.661683953 +0200
@@ -51,6 +51,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/signal.h>
 #include <sys/wait.h>
 #include <fcntl.h>
 
Index: amqpspawn.c
--- amqpspawn.c.orig	2014-07-06 21:15:00.000000000 +0200
+++ amqpspawn.c	2014-07-06 21:21:15.701472664 +0200
@@ -51,6 +51,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/signal.h>
 #include <sys/wait.h>
 #include <fcntl.h>
 #include <sys/socket.h>
