910e94f7228e3ecf5e5b7f555a85e738694e051a
[openwrt/openwrt.git] / tools / dosfstools / Makefile
1 #
2 # Copyright (C) 2012-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:=dosfstools
10 PKG_VERSION:=3.0.27
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \
14 http://fossies.org/linux/misc
15 PKG_MD5SUM:=2e31e7bdf92998e41ed17de505a4a552
16
17 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/host-build.mk
20
21 ifeq ($(HOST_OS),Darwin)
22 LDLIBS += -liconv
23 endif
24
25 define Host/Compile
26 $(MAKE) -C $(HOST_BUILD_DIR) SHELL="$(BASH)" LDFLAGS="$(HOST_LDFLAGS)" LDLIBS="$(LDLIBS)"
27 endef
28
29 define Host/Install
30 $(INSTALL_BIN) $(HOST_BUILD_DIR)/mkfs.fat $(STAGING_DIR_HOST)/bin/
31 $(LN) mkfs.fat $(STAGING_DIR_HOST)/bin/mkdosfs
32 endef
33
34 define Host/Clean
35 rm -f $(STAGING_DIR_HOST)/bin/mk{dosfs,fs.fat}
36 endef
37
38 $(eval $(call HostBuild))