Marc Jones (marcj303@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1995
-gerrit
commit 12ad4b66e50ba3e362784be5aff02c55c721660e Author: Marc Jones marc.jones@se-eng.com Date: Fri Nov 30 17:15:36 2012 -0700
coreinfo: Build libpayload from coreinfo makefile
Build libpayload and install it in the coreinfo directory. Allows coreinfo can be built with a single make command.
Change-Id: I56982265555aae16e482b0a0040989c1f5317423 Signed-off-by: Marc Jones marc.jones@se-eng.com --- payloads/coreinfo/Makefile | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/payloads/coreinfo/Makefile b/payloads/coreinfo/Makefile index 5736314..1879901 100644 --- a/payloads/coreinfo/Makefile +++ b/payloads/coreinfo/Makefile @@ -45,9 +45,12 @@ HOSTCXX ?= g++ HOSTCFLAGS := -I$(srck) -I$(objk) HOSTCXXFLAGS := -I$(srck) -I$(objk)
-LIBPAYLOAD_DIR := ../libpayload/install/libpayload -LPCC := $(LIBPAYLOAD_DIR)/bin/lpgcc -LPAS := $(LIBPAYLOAD_DIR)/bin/lpas +LIBCONFIG_PATH := ../libpayload +LIBPAYLOAD_DIR := ./libpayloadbin +LPCC := $(LIBPAYLOAD_DIR)/libpayload/bin/lpgcc +LPAS := $(LIBPAYLOAD_DIR)/libpayload/bin/lpas +HAVE_LIBPAYLOAD := $(wildcard $(LIBPAYLOAD_DIR)/libpayload/lib/libpayload.a) +LIB_CONFIG ?= defconfig OBJCOPY ?= objcopy
INCLUDES = -I$(obj) @@ -62,18 +65,18 @@ ifneq ($(strip $(HAVE_DOTCONFIG)),) include $(src)/.config all: $(TARGET)
-$(TARGET): $(src)/.config $(OBJS) prepare +$(TARGET): $(src)/.config $(OBJS) prepare libpayload $(Q)printf " LPCC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(LPCC) -o $@ $(OBJS) $(Q)$(OBJCOPY) --only-keep-debug $@ $(TARGET).debug $(Q)$(OBJCOPY) --strip-debug $@ $(Q)$(OBJCOPY) --add-gnu-debuglink=$(TARGET).debug $@
-$(obj)/%.S.o: $(src)/%.S +$(obj)/%.S.o: $(src)/%.S libpayload $(Q)printf " LPAS $(subst $(shell pwd)/,,$(@))\n" $(Q)$(LPAS) -o $@ $<
-$(obj)/%.o: $(src)/%.c +$(obj)/%.o: $(src)/%.c libpayload $(Q)printf " LPCC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(LPCC) $(CFLAGS) -c -o $@ $<
@@ -81,6 +84,16 @@ else all: config endif
+ifneq ($(strip $(HAVE_LIBPAYLOAD)),) +libpayload: + $(Q)printf "Found Libpayload $(LIBPAYLOAD_DIR).\n" +else +libpayload: + $(Q)printf "Building libpayload @ $(LIBCONFIG_PATH).\n" + $(Q)make -C $(LIBCONFIG_PATH) distclean + $(Q)make -C $(LIBCONFIG_PATH) $(LIB_CONFIG) + $(Q)make -C $(LIBCONFIG_PATH) DESTDIR=$(shell pwd)/$(LIBPAYLOAD_DIR) install +endif
prepare: $(Q)mkdir -p $(obj)/util/kconfig/lxdialog