AA: openssl: Support multi-threaded applications
[12.09/openwrt.git] / package / uboot-pxa / Makefile
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=u-boot
12 PKG_VERSION:=2011.08.25
13 PKG_RELEASE:=1
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=git://github.com/ashcharles/verdex-uboot.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=ca6bf3ef6ac5f5132a359b43dfa31e07076b74b7
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define uboot/Default
24   TITLE:=
25   CONFIG:=
26   IMAGE:=
27 endef
28
29 define uboot/gumstix
30   TITLE:=U-Boot for the Gumstix Verdex
31 endef
32
33 UBOOTS:=gumstix
34
35 define Package/uboot/template
36 define Package/uboot-pxa-$(1)
37   SECTION:=boot
38   CATEGORY:=Boot Loaders
39   DEPENDS:=@TARGET_pxa
40   TITLE:=$(2)
41   URL:=http://www.denx.de/wiki/U-Boot
42   VARIANT:=$(1)
43 endef
44 endef
45
46 define BuildUBootPackage
47         $(eval $(uboot/Default))
48         $(eval $(uboot/$(1)))
49         $(call Package/uboot/template,$(1),$(TITLE))
50 endef
51
52 ifdef BUILD_VARIANT
53 $(eval $(call uboot/$(BUILD_VARIANT)))
54 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
55 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
56 endif
57
58 define Build/Configure
59         $(MAKE) -C $(PKG_BUILD_DIR) \
60                 $(UBOOT_CONFIG)_config
61 endef
62
63 define Build/Compile
64         $(MAKE) -C $(PKG_BUILD_DIR) \
65                 u-boot.bin \
66                 CROSS_COMPILE=$(TARGET_CROSS)
67 endef
68
69 define Package/uboot/install/default
70         $(INSTALL_DIR) $(BIN_DIR)
71         $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
72                 $(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin
73 endef
74
75 define Package/uboot/install/template
76 define Package/uboot-pxa-$(1)/install
77         $(call Package/uboot/install/default,$(2))
78 endef
79 endef
80
81 $(foreach u,$(UBOOTS), \
82         $(eval $(call Package/uboot/install/template,$(u),$(u))) \
83 )
84
85 $(foreach u,$(UBOOTS), \
86         $(eval $(call BuildUBootPackage,$(u))) \
87         $(eval $(call BuildPackage,uboot-pxa-$(u))) \
88 )