$(call Host/Prepare/Default)
endef
+ifeq ($(HOST_OS),Darwin)
+ HOST_CFLAGS += -I/usr/local/opt/openssl/include
+ HOST_LDFLAGS += -L/usr/local/opt/openssl/lib
+endif
+
HOST_CONFIGURE_VARS = \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
- SHELL="$(BASH)"
+ SHELL="$(SHELL)"
HOST_CONFIGURE_ARGS = \
--target=$(GNU_HOST_NAME) \
HOST_MAKE_FLAGS =
-HOST_CONFIGURE_CMD = ./configure
-
-ifneq ($(HOST_OS),Darwin)
- ifeq ($(CONFIG_BUILD_STATIC_TOOLS),y)
- HOST_STATIC_LINKING = -static
- endif
-endif
+HOST_CONFIGURE_CMD = $(BASH) ./configure
define Host/Configure/Default
$(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \
$(1) : export STAGING_PREFIX=$$(STAGING_DIR_HOST)
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig
$(1) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig
+ $(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache
endef
Host/Exports=$(Host/Exports/Default)
touch $$@
$(call Host/Exports,$(HOST_STAMP_BUILT))
- ifdef Host/Install
- host-install: $(if $(STAMP_BUILT),$(HOST_STAMP_BUILT),$(HOST_STAMP_INSTALLED))
- endif
-
- ifndef STAMP_BUILT
- prepare: host-prepare
- compile: host-compile
- install: host-install
- clean: host-clean
- update: host-update
- refresh: host-refresh
-
- $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED)
+ $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED)
$(foreach hook,$(Hooks/HostCompile/Pre),$(call $(hook))$(sep))
$(call Host/Compile)
$(foreach hook,$(Hooks/HostCompile/Post),$(call $(hook))$(sep))
touch $$@
- $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT) $(if $(FORCE_HOST_INSTALL),FORCE)
+ $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT) $(if $(FORCE_HOST_INSTALL),FORCE)
$(call Host/Install)
$(foreach hook,$(Hooks/HostInstall/Post),$(call $(hook))$(sep))
mkdir -p $$(shell dirname $$@)
+ touch $(HOST_STAMP_BUILT)
touch $$@
- else
- $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED) $(if $(FORCE_HOST_INSTALL),FORCE)
- $(foreach hook,$(Hooks/HostCompile/Pre),$(call $(hook))$(sep))
- $(call Host/Compile)
- $(foreach hook,$(Hooks/HostCompile/Post),$(call $(hook))$(sep))
- $(call Host/Install)
- $(foreach hook,$(Hooks/HostInstall/Post),$(call $(hook))$(sep))
- touch $$@
+
+ ifndef STAMP_BUILT
+ prepare: host-prepare
+ compile: host-compile
+ install: host-install
+ clean: host-clean
+ update: host-update
+ refresh: host-refresh
endif
+
host-prepare: $(HOST_STAMP_PREPARED)
host-configure: $(HOST_STAMP_CONFIGURED)
- host-compile: $(HOST_STAMP_BUILT)
- host-install:
+ host-compile: $(HOST_STAMP_BUILT) $(if $(STAMP_BUILT),$(HOST_STAMP_INSTALLED))
+ host-install: $(HOST_STAMP_INSTALLED)
host-clean: FORCE
$(call Host/Clean)
$(call Host/Uninstall)