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