tools: fix make_ext4fs build with recent glibc
[openwrt/openwrt.git] / tools / make-ext4fs / Makefile
1 #
2 # Copyright (C) 2015 OpenWrt.org
3 # Copyright (C) 2016 LEDE project
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=make-ext4fs
11 PKG_VERSION:=2016-04-25
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=http://git.openwrt.org/project/make_ext4fs.git
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_VERSION:=bf98b86a5df5fcfb658d77fd5e0897ca87a35e8e
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_MIRROR_MD5SUM:=2c4161638d4ff3343e250321126d29e6
19 PKG_CAT:=zcat
20
21 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/host-build.mk
24
25 ifeq ($(HOST_OS),Linux)
26 MAKE_STATIC := STATIC=1
27 endif
28
29 define Host/Compile
30 $(MAKE) -C $(HOST_BUILD_DIR) make_ext4fs $(MAKE_STATIC)
31 endef
32
33 define Host/Install
34 $(INSTALL_BIN) $(HOST_BUILD_DIR)/make_ext4fs $(STAGING_DIR_HOST)/bin/
35 endef
36
37 define Host/Clean
38 rm -f $(STAGING_DIR_HOST)/bin/make_ext4fs
39 endef
40
41 $(eval $(call HostBuild))