mirror of
				https://github.com/optim-enterprises-bv/openwrt-ipq.git
				synced 2025-10-30 17:58:28 +00:00 
			
		
		
		
	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 <rosenp@gmail.com>
This commit is contained in:
		 Rosen Penev
					Rosen Penev
				
			
				
					committed by
					
						 Christian Marangi
						Christian Marangi
					
				
			
			
				
	
			
			
			 Christian Marangi
						Christian Marangi
					
				
			
						parent
						
							42eeb22450
						
					
				
				
					commit
					291b137778
				
			| @@ -104,6 +104,7 @@ $(curdir)/isl/compile := $(curdir)/gmp/compile | |||||||
| $(curdir)/liblzo/compile := $(curdir)/cmake/compile | $(curdir)/liblzo/compile := $(curdir)/cmake/compile | ||||||
| $(curdir)/libressl/compile := $(curdir)/pkgconf/compile | $(curdir)/libressl/compile := $(curdir)/pkgconf/compile | ||||||
| $(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/missing-macros/compile | $(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/missing-macros/compile | ||||||
|  | $(curdir)/lz4/compile := $(curdir)/meson/compile | ||||||
| $(curdir)/lzma-old/compile := $(curdir)/zlib/compile | $(curdir)/lzma-old/compile := $(curdir)/zlib/compile | ||||||
| $(curdir)/lzop/compile := $(curdir)/cmake/compile $(curdir)/liblzo/compile | $(curdir)/lzop/compile := $(curdir)/cmake/compile $(curdir)/liblzo/compile | ||||||
| $(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile | $(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile | ||||||
|   | |||||||
| @@ -17,33 +17,21 @@ PKG_HASH:=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b | |||||||
| PKG_LICENSE:=BSD-2-Clause | PKG_LICENSE:=BSD-2-Clause | ||||||
| PKG_LICENSE_FILES:=LICENSE lib/LICENSE | PKG_LICENSE_FILES:=LICENSE lib/LICENSE | ||||||
|  |  | ||||||
| HOST_BUILD_PARALLEL:=1 |  | ||||||
|  |  | ||||||
| include $(INCLUDE_DIR)/host-build.mk | 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 | # Always optimize for speed | ||||||
| HOST_CFLAGS := $(filter-out -O%,$(HOST_CFLAGS)) -O3 | HOST_CFLAGS := $(filter-out -O%,$(HOST_CFLAGS)) -O3 | ||||||
|  |  | ||||||
| HOST_MAKE_FLAGS+=PREFIX=$(HOST_BUILD_PREFIX) \ | MESON_HOST_ARGS += \ | ||||||
| 		 ENABLE_DOCS=1 | 	-Ddefault_library=static \ | ||||||
|  | 	-Ddebug-level=0 \ | ||||||
| define Host/Configure | 	-Dunstable=false \ | ||||||
| endef | 	-Dprograms=true \ | ||||||
|  | 	-Dtests=false \ | ||||||
| define Host/Compile | 	-Dcontrib=false \ | ||||||
| 	$(call Host/Compile/Default,default) | 	-Dexamples=false | ||||||
| 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 |  | ||||||
|  |  | ||||||
| $(eval $(call HostBuild)) | $(eval $(call HostBuild)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user