summaryrefslogtreecommitdiff
path: root/payloads/libpayload/sample
diff options
context:
space:
mode:
authorAndrew Wu <arw@dmp.com.tw>2013-10-07 16:27:01 +0800
committerJonathan A. Kollasch <jakllsch@kollasch.net>2013-10-17 01:54:43 +0200
commitc2a8031a5eb8ed22ab6f906e44445af1c9487361 (patch)
tree6b4d235710868fb58c6a3921496c8ba3cbed9508 /payloads/libpayload/sample
parent697927cc35c80ddbe91d868ba1e41fb68dda815d (diff)
libpayload/sample: Use settings from .xcompile file to build.
It is for crossgcc. Change-Id: Ia1d676adfea340b6b80858215459491c9338d614 Signed-off-by: Andrew Wu <arw@dmp.com.tw> Reviewed-on: http://review.coreboot.org/3955 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Diffstat (limited to 'payloads/libpayload/sample')
-rw-r--r--payloads/libpayload/sample/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/payloads/libpayload/sample/Makefile b/payloads/libpayload/sample/Makefile
index 1a32f3b0fb..67697e85fd 100644
--- a/payloads/libpayload/sample/Makefile
+++ b/payloads/libpayload/sample/Makefile
@@ -28,9 +28,18 @@
##
# Sample libpayload Makefile.
+include ../.xcompile
+include ../.config
+
+ARCH-$(CONFIG_ARCH_ARMV7) := armv7
+ARCH-$(CONFIG_ARCH_POWERPC) := powerpc
+ARCH-$(CONFIG_ARCH_X86) := i386
+
+CC := $(CC_$(ARCH-y))
+AS := $(AS_$(ARCH-y))
LIBPAYLOAD_DIR := ../install/libpayload
-XCC := CC=$(CC) $(LIBPAYLOAD_DIR)/bin/lpgcc
-XAS := AS=$(AS) $(LIBPAYLOAD_DIR)/bin/lpas
+XCC := CC="$(CC)" $(LIBPAYLOAD_DIR)/bin/lpgcc
+XAS := AS="$(AS)" $(LIBPAYLOAD_DIR)/bin/lpas
CFLAGS := -Wall -Werror -Os
TARGET := hello
OBJS := $(TARGET).o