remove -fhonour-copts usage
[openadk.git] / package / u-boot-avr32 / Makefile
blob2886ddd3cd39bbe2f1f7240fe540ad870c53a84c
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= u-boot-avr32
7 PKG_VERSION:= 2017.05
8 PKG_RELEASE:= 1
9 PKG_HASH:= c8373949d7f0de1059e507b83a655d4cea539f75dc66ccdbb27adbd38d83095e
10 PKG_DESCR:= portable bootloader
11 PKG_SECTION:= base/boot
12 HOST_BUILDDEP:= libressl-host dtc-host
13 PKG_BUILDDEP:= u-boot-host
14 PKG_URL:= http://www.denx.de/wiki/U-Boot
15 PKG_SITES:= ftp://ftp.denx.de/pub/u-boot/
17 DISTFILES:= u-boot-$(PKG_VERSION).tar.bz2
19 PKG_SYSTEM_DEPENDS:= atmel-ngw100
21 include $(ADK_TOPDIR)/mk/host.mk
22 include $(ADK_TOPDIR)/mk/package.mk
24 $(eval $(call HOST_template,U_BOOT_AVR32,u-boot-avr32,$(PKG_VERSION)-$(PKG_RELEASE)))
25 $(eval $(call PKG_template,U_BOOT_AVR32,u-boot-avr32,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
27 UBOOT:= u-boot.bin
28 ifeq ($(ADK_TARGET_SYSTEM_ATMEL_NGW100),y)
29 CONFIG:= atngw100_defconfig
30 endif
32 HOST_MAKE_FLAGS+= HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" \
33 HOSTLDFLAGS="$(HOST_LDFLAGS) -ldl"
34 HOST_STYLE:= manual
35 CONFIG_STYLE:= manual
36 BUILD_STYLE:= manual
37 INSTALL_STYLE:= manual
39 host-build:
40 (cd $(WRKBUILD) && env $(HOST_MAKE_ENV) $(MAKE) -f $(MAKE_FILE) \
41 $(HOST_MAKE_FLAGS) sandbox_defconfig )
42 (cd $(WRKBUILD) && env $(HOST_MAKE_ENV) $(MAKE) -f $(MAKE_FILE) \
43 $(HOST_MAKE_FLAGS) tools $(MAKE_TRACE) )
45 u-boot-hostinstall:
46 $(INSTALL_BIN) $(WRKBUILD)/tools/mk{,env}image \
47 $(STAGING_HOST_DIR)/usr/bin
49 do-configure:
50 (cd $(WRKBUILD) && $(MAKE) $(CONFIG))
52 do-build:
53 (cd $(WRKBUILD) && env \
54 PATH='$(HOST_PATH)' \
55 CROSS_COMPILE='$(TARGET_CROSS)' \
56 $(MAKE))
57 ifneq ($(OS_FOR_BUILD),Darwin)
58 (cd $(WRKBUILD) && env \
59 PATH='$(HOST_PATH)' \
60 CROSS_COMPILE='$(TARGET_CROSS)' \
61 $(MAKE) env)
62 endif
64 u-boot-install:
65 $(CP) $(WRKBUILD)/$(UBOOT) $(FW_DIR)
66 $(INSTALL_DIR) $(IDIR_U_BOOT)/etc
67 $(CP) ./files/fw_env.config $(IDIR_U_BOOT)/etc
68 ifneq ($(OS_FOR_BUILD),Darwin)
69 $(INSTALL_DIR) $(IDIR_U_BOOT)/usr/bin
70 $(INSTALL_BIN) $(WRKBUILD)/tools/env/fw_printenv \
71 $(IDIR_U_BOOT)/usr/bin
72 (cd $(IDIR_U_BOOT)/usr/bin && ln -sf fw_printenv fw_setenv)
73 $(INSTALL_BIN) ./files/uboot_print_env $(IDIR_U_BOOT)/usr/bin
74 $(INSTALL_BIN) ./files/uboot_set_env $(IDIR_U_BOOT)/usr/bin
75 endif
76 ifeq ($(ADK_TARGET_SYSTEM_BANANA_PRO),y)
77 $(INSTALL_BIN) ./files/boot.script.bpi $(FW_DIR)
78 endif
79 ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG),y)
80 $(INSTALL_BIN) ./files/boot.script.clearfog $(FW_DIR)
81 endif
82 ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
83 $(INSTALL_BIN) $(WRKBUILD)/SPL $(FW_DIR)
84 $(INSTALL_BIN) ./files/boot.script.imx6 $(FW_DIR)
85 endif
86 ifeq ($(ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK),y)
87 $(CP) ./files/uEnv.txt.bbb $(FW_DIR)/uEnv.txt
88 $(INSTALL_BIN) $(WRKBUILD)/MLO $(FW_DIR)
89 endif
91 include $(ADK_TOPDIR)/mk/host-bottom.mk
92 include $(ADK_TOPDIR)/mk/pkg-bottom.mk