Skip to content

Commit

Permalink
iperf3: update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Aug 26, 2023
1 parent 37e26b0 commit 2f52b75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 37 deletions.
53 changes: 16 additions & 37 deletions trunk/user/iperf3/Makefile
Original file line number Diff line number Diff line change
@@ -1,45 +1,24 @@
SRC_NAME = iperf-3.7
SRC_URL = https://downloads.es.net/pub/iperf/iperf-3.7.tar.gz
THISDIR = $(shell pwd)
include $(ROOTDIR)/rules.mk

all: download_test extract_test config_test
$(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)
PKG_NAME:=iperf
PKG_VERSION:=3.11

download_test:
( if [ ! -f $(SRC_NAME).tar.gz ]; then \
wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \
fi )
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.es.net/pub/iperf
PKG_HASH:=de8cb409fad61a0574f4cb07eb19ce1159707403ac2dc01b5d175e91240b7e5f

extract_test:
( if [ ! -d $(SRC_NAME) ]; then \
tar -xf $(SRC_NAME).tar.gz; \
fi )
PKG_FIXUP:=autoreconf

config_test:
( if [ -f ./config_done ]; then \
echo "the same configuration"; \
else \
make configure && touch config_done; \
fi )
include $(INCLUDE_DIR)/package.mk

configure:
( cd $(SRC_NAME) ; \
./configure \
--prefix=/usr \
--disable-profiling \
--without-openssl \
--disable-shared \
--enable-static \
--host=$(HOST_TARGET) \
--build=$(HOST_BUILD) ; \
)
TARGET_CFLAGS += -D_GNU_SOURCE
CONFIGURE_ARGS += \
--disable-shared \
--enable-static \
--without-openssl

clean:
if [ -f $(SRC_NAME)/Makefile ] ; then \
$(MAKE) -C $(SRC_NAME) distclean ; \
fi ; \
rm -f config_done
$(eval $(call BuildPackage,iperf))

romfs:
$(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/src/iperf3 /usr/bin/iperf3

$(INSTALL_DIR) $(ROMFSDIR)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf3 $(ROMFSDIR)/bin/iperf3
Binary file removed trunk/user/iperf3/iperf-3.7.tar.gz
Binary file not shown.

0 comments on commit 2f52b75

Please sign in to comment.