# Define target specific options. # For each target build type, define cross compiling environment. # Call with: type, typevar define TARGET_template ifeq ($$($2),) # Target is synthetic or maximus. else ifeq ($$($2),sparc) # Target is sparc. $2_CROSS_COMPILE := $$($2)-elf- $2_MAKE_BIN := y $2_MAKE_ROM := y $2_MAKE_LST := y $2_MAKE_SIZE := y # Sparc v8. $2_CFLAGS += -mcpu=v8 $2_CXXFLAGS += -mcpu=v8 else ifeq ($$($2),arm) # Target is ARM. $2_CROSS_COMPILE := $$($2)-linux- else ifneq ($$($2_PROGRAMS),) $$(error unknown $2: $$($2)) endif # User defined compiler. ifneq ($$(CROSS_COMPILE_$$($2)),) $2_CROSS_COMPILE := $$(CROSS_COMPILE_$$($2)) endif endef $(foreach type,$(filter-out host,$(BUILD_TYPES)),\ $(eval $(call TARGET_template,$(type),$(call type2var,$(type)))))