Fix ordering problem in the libpayload Makefile. The include of
authorUwe Hermann <uwe@hermann-uwe.de>
Wed, 22 Oct 2008 15:49:20 +0000 (15:49 +0000)
committerJordan Crouse <jordan.crouse@amd.com>
Wed, 22 Oct 2008 15:49:20 +0000 (15:49 +0000)
'include util/kconfig/Makefile' must come before certain pattern rules
for compilation of kconfig files, otherwise the build would break
in most situations.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3686 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

payloads/libpayload/Makefile

index a426d847c17cc6f6a4d173c81f44b26c8e68b3e1..4fcf72b54583af368ff25b1ccf26b1c24a3abf16 100644 (file)
@@ -115,16 +115,6 @@ $(obj)/lib/libpayload.a: $(OBJS)
        $(Q)printf "  AR      $(subst $(shell pwd)/,,$(@))\n"
        $(Q)$(AR) rc $@ $(OBJS)
 
-include util/kconfig/Makefile
-
-$(obj)/%.o: $(src)/%.c
-       $(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
-       $(Q)$(CC) -m32 $(CFLAGS) -c -o $@ $<
-
-$(obj)/%.S.o: $(src)/%.S
-       $(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
-       $(Q)$(CC) -m32 $(CFLAGS) -c -o $@ $<
-
 endif
 
 install: lib
@@ -169,6 +159,22 @@ distclean: clean
        $(Q)rm -rf build
        $(Q)rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig*
 
+# This include must come _before_ the pattern rules below!
+# Order _does_ matter for pattern rules.
+include util/kconfig/Makefile
+
+ifeq ($(strip $(HAVE_DOTCONFIG)),)
+else
+
+$(obj)/%.o: $(src)/%.c
+       $(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+       $(Q)$(CC) -m32 $(CFLAGS) -c -o $@ $<
+
+$(obj)/%.S.o: $(src)/%.S
+       $(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+       $(Q)$(CC) -m32 $(CFLAGS) -c -o $@ $<
+
+endif
 
 .PHONY: $(PHONY) prepare clean distclean doxygen doxy