modify
All checks were successful
C/C++ CI / build (push) Successful in 21s

This commit is contained in:
ecpvint
2024-06-21 19:06:53 +08:00
parent 4e23ebe167
commit 123724321c
4 changed files with 32 additions and 31 deletions

View File

@ -6,11 +6,10 @@
# $date: Sun Jul 25 17:56:15 MET DST 1999$
# $rev: 3$
CC= gcc
CC= clang
AR=/usr/bin/ar
RANLIB=/usr/bin/ranlib
CCOPT= -O2 -Wall
DEBUG= -g
CCOPT= -O2 -Wall
#uncomment the following if you need libpcap based build under linux
#(not raccomanded)
COMPILE_TIME=
@ -36,42 +35,42 @@ OBJ= main.o getifname.o getlhs.o \
ARSOBJ = ars.o apd.o split.o
all: hping6
all: hping3
libars.a: $(ARSOBJ)
$(AR) rc $@ $^
$(RANLIB) $@
hping6: byteorder.h $(OBJ)
$(CC) -o hping6 $(CCOPT) $(DEBUG) $(OBJ) $(PCAP)
hping3: byteorder.h $(OBJ)
$(CC) -o hping3 $(CCOPT) $(OBJ) $(PCAP)
@echo
./hping6 -v
@echo "use \`make strip' to strip hping6 binary"
@echo "use \`make install' to install hping6"
./hping3 -v
@echo "use \`make strip' to strip hping3 binary"
@echo "use \`make install' to install hping3"
byteorder.h:
./configure
.c.o:
$(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
$(CC) -c $(CCOPT) $(COMPILE_TIME) $<
clean:
rm -rf hping6 *.o *.a
rm -rf hping3 *.o *.a
-(cd utils; $(MAKE) clean)
distclean:
rm -rf hping6 *.o *.a byteorder byteorder.h systype.h Makefile
rm -rf hping3 *.o *.a byteorder byteorder.h systype.h Makefile
-(cd utils; $(MAKE) clean)
install: hping6
install: hping3
mkdir -p ${prefix}/sbin/
cp -f hping6 ${prefix}/sbin/
chmod 755 ${prefix}/sbin/hping6
cp -f hping3 ${prefix}/sbin/
chmod 755 ${prefix}/sbin/hping3
@if [ -f ${prefix}/sbin/hping2 ]; then \
rm ${prefix}/sbin/hping2; \
fi
strip: hping6
@ls -l ./hping6
strip hping6
@ls -l ./hping6
strip: hping3
@ls -l ./hping3
strip hping3
@ls -l ./hping3