tools/gengetopt: override SUBDIRS variable with Makefile
[openwrt/staging/nbd.git] / tools / gengetopt / Makefile
1 #
2 # Copyright (C) 2014 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:=gengetopt
10 PKG_VERSION:=2.23
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
13 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
14 PKG_HASH:=b941aec9011864978dd7fdeb052b1943535824169d2aa2b0e7eae9ab807584ac
15
16 PKG_SUBDIRS:=$$$$(foreach dir,gl src skels,$$$$(wildcard $$$$(dir)) )
17
18 HOST_BUILD_PARALLEL:=1
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 define Host/Compile
23 $(call Host/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
24 endef
25
26 define Host/Install
27 $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/gengetopt $(STAGING_DIR_HOST)/bin/
28 endef
29
30 define Host/Clean
31 rm -f $(STAGING_DIR_HOST)/bin/gengetopt
32 endef
33
34 $(eval $(call HostBuild))