You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.5 KiB
106 lines
2.5 KiB
################################################################################
|
|
#
|
|
# Generic packages
|
|
#
|
|
################################################################################
|
|
|
|
#TARGET_MAKE_ENV =
|
|
# $($(PKG)_MAKE_ENV)
|
|
|
|
TARGET_MAKE_OPTS = \
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
CC="$(TARGET_CC)" \
|
|
GCC="$(TARGET_CC)" \
|
|
CPP="$(TARGET_CPP)" \
|
|
CXX="$(TARGET_CXX)" \
|
|
LD="$(TARGET_LD)" \
|
|
AR="$(TARGET_AR)" \
|
|
AS="$(TARGET_AS)" \
|
|
NM="$(TARGET_NM)" \
|
|
OBJCOPY="$(TARGET_OBJCOPY)" \
|
|
OBJDUMP="$(TARGET_OBJDUMP)" \
|
|
RANLIB="$(TARGET_RANLIB)" \
|
|
READELF="$(TARGET_READELF)" \
|
|
STRIP="$(TARGET_STRIP)" \
|
|
ARCH=$(TARGET_ARCH)
|
|
|
|
#TARGET_MAKE_OPTS += \
|
|
# $($(PKG)_MAKE_OPTS)
|
|
|
|
define TARGET_MAKE
|
|
@$(call MESSAGE,"Compiling")
|
|
$(foreach hook,$($(PKG)_PRE_COMPILE_HOOKS),$(call $(hook))$(sep))
|
|
$(Q)( \
|
|
$(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \
|
|
$(MAKE); \
|
|
)
|
|
$(foreach hook,$($(PKG)_POST_COMPILE_HOOKS),$(call $(hook))$(sep))
|
|
endef
|
|
|
|
define TARGET_MAKE_INSTALL
|
|
@$(call MESSAGE,"Installing")
|
|
$(foreach hook,$($(PKG)_PRE_INSTALL_HOOKS),$(call $(hook))$(sep))
|
|
$(Q)( \
|
|
$(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \
|
|
$(MAKE) install DESTDIR=$(TARGET_DIR); \
|
|
)
|
|
$(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep))
|
|
endef
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
define generic-package
|
|
$(call PREPARE)
|
|
$(call TARGET_MAKE)
|
|
$(call TARGET_MAKE_INSTALL)
|
|
$(call TARGET_FOLLOWUP)
|
|
endef
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
#HOST_MAKE_ENV = \
|
|
# $($(PKG)_MAKE_ENV)
|
|
|
|
HOST_MAKE_OPTS = \
|
|
CC="$(HOSTCC)" \
|
|
GCC="$(HOSTCC)" \
|
|
CPP="$(HOSTCPP)" \
|
|
CXX="$(HOSTCXX)" \
|
|
LD="$(HOSTLD)" \
|
|
AR="$(HOSTAR)" \
|
|
AS="$(HOSTAS)" \
|
|
NM="$(HOSTNM)" \
|
|
OBJCOPY="$(HOSTOBJCOPY)" \
|
|
RANLIB="$(HOSTRANLIB)"
|
|
|
|
#HOST_MAKE_OPTS += \
|
|
# $($(PKG)_MAKE_OPTS)
|
|
|
|
define HOST_MAKE
|
|
@$(call MESSAGE,"Compiling")
|
|
$(foreach hook,$($(PKG)_PRE_COMPILE_HOOKS),$(call $(hook))$(sep))
|
|
$(Q)( \
|
|
$(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \
|
|
$(MAKE); \
|
|
)
|
|
$(foreach hook,$($(PKG)_POST_COMPILE_HOOKS),$(call $(hook))$(sep))
|
|
endef
|
|
|
|
define HOST_MAKE_INSTALL
|
|
@$(call MESSAGE,"Installing")
|
|
$(foreach hook,$($(PKG)_PRE_INSTALL_HOOKS),$(call $(hook))$(sep))
|
|
$(Q)( \
|
|
$(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \
|
|
$(MAKE) install; \
|
|
)
|
|
$(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep))
|
|
endef
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
define host-generic-package
|
|
$(call PREPARE)
|
|
$(call HOST_MAKE)
|
|
$(call HOST_MAKE_INSTALL)
|
|
$(call HOST_FOLLOWUP)
|
|
endef
|
|
|