From 291b137778eece9edf4b960d4d5c27fc1ce91e06 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 20 Apr 2023 01:59:32 -0700 Subject: tools/lz4: build with meson Simplifies Makefile and speeds up compilation. Before: Executed in 68.00 secs fish external usr time 104.17 secs 1.33 millis 104.17 secs sys time 4.29 secs 0.35 millis 4.29 secs After: Executed in 27.98 secs fish external usr time 25.18 secs 1.32 millis 25.18 secs sys time 3.31 secs 0.35 millis 3.31 secs Signed-off-by: Rosen Penev --- tools/lz4/Makefile | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'tools/lz4') diff --git a/tools/lz4/Makefile b/tools/lz4/Makefile index c5d4f6f16b..8f12ca93e6 100644 --- a/tools/lz4/Makefile +++ b/tools/lz4/Makefile @@ -17,33 +17,21 @@ PKG_HASH:=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE lib/LICENSE -HOST_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/meson.mk + +MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/contrib/meson/openwrt-build # Always optimize for speed HOST_CFLAGS := $(filter-out -O%,$(HOST_CFLAGS)) -O3 -HOST_MAKE_FLAGS+=PREFIX=$(HOST_BUILD_PREFIX) \ - ENABLE_DOCS=1 - -define Host/Configure -endef - -define Host/Compile - $(call Host/Compile/Default,default) -endef - -define Host/Install - $(call Host/Compile/Default,install) -endef - -define Host/Uninstall - $(call Host/Compile/Default,uninstall) - $(call Host/Compile/Default,clean) -endef - -define Host/Clean -endef +MESON_HOST_ARGS += \ + -Ddefault_library=static \ + -Ddebug-level=0 \ + -Dunstable=false \ + -Dprograms=true \ + -Dtests=false \ + -Dcontrib=false \ + -Dexamples=false $(eval $(call HostBuild)) -- cgit v1.2.3