SHA256
1
0
forked from pool/bittwist
bittwist/bittwist-makefile.diff
Martin Hauke 06c3f07542 Accepting request 1096380 from home:mnhauke
- Update to version 3.7
  Changes since 2.0:
  general
  * added support for trace files with nanosecond resolution.
  * updated manual pages.
  * use in-memory trace files when sending packets in loop.
  * fixed integer overflow in stats output.
  * added static code analysis in Makefile (make check).
  * reformatted source files for C17 standard.
  * added initial python testing framework for Linux systems.
  bittwist (generator):
  * 30% speed up when sending large pcap file.
  * fixed linerate throttling.
  * updated -p option to send packets at set packets per second
    (pps).
  * added -t option to set inter-packet gap (this was previously
    -p option).
  * removed speed (-m) flag; use -p/-r to shape throughput.
  * updated linerate (-r) flag to use token bucket algorithm.
  bittwiste (editor)
  * added -G option to set fixed or random inter-packet gap in
    microseconds.
  * added support for CIDR notation when modifying IPv4/IPv6
    addressA.
  * added support for random MAC address.
  * added option to edit IPv6 next header.
  * added random number support for id, ttl, proto, next header,
    hop limit.
  * added option to set uniformly distributed random number
    (mersenne twister). for tcp/udp source/destination port and

OBS-URL: https://build.opensuse.org/request/show/1096380
OBS-URL: https://build.opensuse.org/package/show/network:utilities/bittwist?expand=0&rev=5
2023-07-05 14:36:49 +00:00

47 lines
2.0 KiB
Diff

diff --git a/Makefile b/Makefile
index 70cf633..f23bb45 100644
--- a/Makefile
+++ b/Makefile
@@ -51,10 +51,10 @@ INSTALL_DATA = ${INSTALL} -m 644
all: bittwist bittwiste
bittwist:
- $(CC) $(CFLAGS) $(SRC)/bittwist.c $(SRC)/token_bucket.c -o $(SRC)/bittwist -I/usr/local/include -L/usr/local/lib -lpcap
+ $(CC) $(CFLAGS) $(SRC)/bittwist.c $(SRC)/token_bucket.c -o $(SRC)/bittwist `pcap-config --libs --cflags`
bittwiste:
- $(CC) $(CFLAGS) $(SRC)/bittwiste.c $(SRC)/tinymt/tinymt64.c $(SRC)/template_pcap.c -o $(SRC)/bittwiste -I $(SRC)/tinymt -I/usr/local/include -L/usr/local/lib -lpcap
+ $(CC) $(CFLAGS) $(SRC)/bittwiste.c $(SRC)/tinymt/tinymt64.c $(SRC)/template_pcap.c -o $(SRC)/bittwiste -I $(SRC)/tinymt `pcap-config --libs --cflags`
clean:
rm -f $(SRC)/bittwist $(SRC)/bittwiste
@@ -66,18 +66,18 @@ format:
$(CLANG_FORMAT) -i src/def.h src/token_bucket.h src/token_bucket.c src/template_pcap.h src/template_pcap.c src/bittwist.h src/bittwist.c src/bittwiste.h src/bittwiste.c
install:
- mkdir -p $(bindir)
- chmod 755 $(bindir)
- $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwiste $(bindir)
- mkdir -p $(mandir)
- chmod 755 $(mandir)
- $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwiste.1 $(mandir)
+ mkdir -p $(DESTDIR)$(bindir)
+ chmod 755 $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwiste $(DESTDIR)$(bindir)
+ mkdir -p $(DESTDIR)$(mandir)
+ chmod 755 $(DESTDIR)$(mandir)
+ $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwiste.1 $(DESTDIR)$(mandir)
uninstall:
- @rm -vf $(wildcard $(bindir)/bittwist)
- @rm -vf $(wildcard $(bindir)/bittwiste)
- @rm -vf $(wildcard $(mandir)/bittwist.1)
- @rm -vf $(wildcard $(mandir)/bittwiste.1)
+ @rm -vf $(wildcard $(DESTDIR)$(bindir)/bittwist)
+ @rm -vf $(wildcard $(DESTDIR)$(bindir)/bittwiste)
+ @rm -vf $(wildcard $(DESTDIR)$(mandir)/bittwist.1)
+ @rm -vf $(wildcard $(DESTDIR)$(mandir)/bittwiste.1)
@rm -vf $(wildcard $(old_bindir)/bittwist)
@rm -vf $(wildcard $(old_bindir)/bittwiste)
@rm -vf $(wildcard $(old_mandir)/bittwist.1)