--- Makefile.in.orig	2010-12-25 22:15:55.000000000 +0100
+++ Makefile.in		2010-12-25 22:21:40.000000000 +0100
@@ -6,15 +6,15 @@
 # $date: Sun Jul 25 17:56:15 MET DST 1999$ 
 # $rev: 3$ 
 
-CC= gcc
+CC=
 AR=/usr/bin/ar
 RANLIB=/usr/bin/ranlib
-CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
-DEBUG= -g
+CFLAGS=
+DEBUG=
 #uncomment the following if you need libpcap based build under linux
 #(not raccomanded)
 COMPILE_TIME=
-INSTALL_MANPATH=@MANPATH@
+#INSTALL_MANPATH=@MANPATH@
 @PCAP@
 
 ARSOBJ = ars.o apd.o split.o rapd.o
@@ -50,20 +50,16 @@
 	$(RANLIB) $@
 
 hping3: byteorder.h $(OBJ)
-	$(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
-	@echo
-	./hping3 -v
-	@echo "use \`make strip' to strip hping3 binary"
-	@echo "use \`make install' to install hping3"
+	$(CC) -o hping3 $(CFLAGS) $(LDFLAGS) $(DEBUG) $(OBJ) $(PCAP) -lm -lpthread
 
 hping3-static: byteorder.h $(OBJ)
-	$(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
+	$(CC) -static -o hping3-static $(CFLAGS) $(LDFLAGS) $(DEBUG) $(OBJ) $(PCAP) -lm -lpthread -ldl
 
 byteorder.h:
 	./configure
 
 .c.o:
-	$(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
+	$(CC) -c $(CFLAGS) $(LDFLAGS) $(DEBUG) $(COMPILE_TIME) $<
 
 clean:
 	rm -rf hping3 *.o libars.a
