7 -CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
9 +CCOPT= $(CFLAGS) @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
11 #uncomment the following if you need libpcap based build under linux
14 @@ -50,17 +50,13 @@ libars.a: $(ARSOBJ)
17 hping3: byteorder.h $(OBJ)
18 - $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
19 + $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) $(PCAP) @SOLARISLIB@ @TCL_LIB@
22 @echo "use \`make strip' to strip hping3 binary"
23 @echo "use \`make install' to install hping3"
25 hping3-static: byteorder.h $(OBJ)
26 - $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
30 + $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
33 $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
34 @@ -72,6 +68,8 @@ distclean:
35 rm -rf hping3 *.o byteorder byteorder.h systype.h Makefile libars.a .depend
40 cp -f hping3 /usr/sbin/
41 chmod 755 /usr/sbin/hping3
42 ln -s /usr/sbin/hping3 /usr/sbin/hping
47 +#ifndef __BYTEORDER_H
48 +#define __BYTEORDER_H
50 +#if defined(__BYTE_ORDER__)
51 + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
52 + #define __BIG_ENDIAN_BITFIELD
54 + #define __LITTLE_ENDIAN_BITFIELD
57 + #error Byte order not set
60 +#endif /* __BYTEORDER_H */
66 +# This fake configure script applies hard-coded settings for OpenWRT
68 +echo creating Makefile...
69 +sed -e "s^@PCAP@^PCAP=-lpcap^g" \
70 + -e "s^@PCAP_INCLUDE@^^g" \
71 + -e "s^@MANPATH@^/usr/share/man^g" \
72 + -e "s^@SOLARISLIB@^^g" \
73 + -e "s^@USE_TCL@^^g" \
74 + -e "s^@TCL_INC@^^g" \
75 + -e "s^@TCL_VER@^^g" \
76 + -e "s^@TCL_LIB@^^g" \
77 + <Makefile.in > Makefile
79 +echo now you can try \`make\'
82 +# Original file follows, to make the patch smaller
96 +#endif /* SYSTYPE_H */