From b826422ab87d00470967da77de4cca57e3c50be3 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Fri, 7 Oct 2016 23:55:47 +0300 Subject: [PATCH] add new variables: BUILD_CROSS, BUILD_NATIVE They are useful for applying flags only to cross or only to native targets. --- Makefile | 1 + src/yasm.mk | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8184be0b..e7c5a4ea 100644 --- a/Makefile +++ b/Makefile @@ -550,6 +550,7 @@ $(PREFIX)/$(3)/installed/$(1): $(PKG_MAKEFILES) \ build-only-$(1)_$(3): PKG = $(1) build-only-$(1)_$(3): TARGET = $(3) build-only-$(1)_$(3): BUILD_$(if $(findstring shared,$(3)),SHARED,STATIC) = TRUE +build-only-$(1)_$(3): BUILD_$(if $(call seq,$(TARGET),$(BUILD)),NATIVE,CROSS) = TRUE build-only-$(1)_$(3): LIB_SUFFIX = $(if $(findstring shared,$(3)),dll,a) build-only-$(1)_$(3): BITS = $(if $(findstring x86_64,$(3)),64,32) build-only-$(1)_$(3): BUILD_TYPE = $(if $(findstring debug,$(3) $($(1)_CONFIGURE_OPTS)),debug,release) diff --git a/src/yasm.mk b/src/yasm.mk index cd7ecc10..e4f361ab 100644 --- a/src/yasm.mk +++ b/src/yasm.mk @@ -19,7 +19,7 @@ endef define $(PKG)_BUILD # link to native yasm compiler on cross builds - $(if $(call sne,$(TARGET),$(BUILD)), + $(if $(BUILD_CROSS), ln -sf '$(PREFIX)/$(BUILD)/bin/yasm' '$(PREFIX)/bin/$(TARGET)-yasm') # yasm is always static