]> xenbits.xensource.com Git - seabios.git/commitdiff
build: Don't require $(OUT) to be a sub-directory of the main directory.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 17 Feb 2013 15:56:10 +0000 (10:56 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 17 Feb 2013 16:06:05 +0000 (11:06 -0500)
Remove references to "../" and "out/" from the build so that "make
OUT=/a/b/c/" will work.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Makefile
src/Kconfig
tools/test-build.sh

index fb0c89ba9c65a2f352bba994758df3c631c85426..ab9ca0e75719535261feeea4541679fc979045ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,7 @@ vpath %.S src vgasrc
 ################ Common build rules
 
 # Verify the build environment works.
-TESTGCC:=$(shell CC="$(CC)" LD="$(LD)" IASL="$(IASL)" tools/test-build.sh)
+TESTGCC:=$(shell OUT="$(OUT)" CC="$(CC)" LD="$(LD)" IASL="$(IASL)" tools/test-build.sh)
 ifeq "$(TESTGCC)" "-1"
 $(error "Please upgrade the build environment")
 endif
@@ -97,7 +97,7 @@ endif
 # Do a whole file compile by textually including all C code.
 define whole-compile
 @echo "  Compiling whole program $3"
-$(Q)printf '$(foreach i,$2,#include "../$i"\n)' > $3.tmp.c
+$(Q)printf '$(foreach i,$2,#include "$(CURDIR)/$i"\n)' > $3.tmp.c
 $(Q)$(CC) $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3
 endef
 
index 6c9ab5f9d74d28d91204b1cfe3654fdceae037e2..119ea3429716592f120a09a5b86309fe4483d7cf 100644 (file)
@@ -380,7 +380,7 @@ menu "BIOS Tables"
             Support generation of ACPI tables.
 endmenu
 
-source ../vgasrc/Kconfig
+source vgasrc/Kconfig
 
 menu "Debugging"
     config DEBUG_LEVEL
index 7bd6d1fe4c9f8a6e29dbe209769bc82e0a5ffd42..ce0aca993f40bd0d88705d5ae39f8425bae6e611 100755 (executable)
@@ -14,13 +14,13 @@ if [ $? -ne 0 ]; then
     exit 0
 fi
 
-mkdir -p out
-TMPFILE1=out/tmp_testcompile1.c
-TMPFILE1o=out/tmp_testcompile1.o
-TMPFILE1_ld=out/tmp_testcompile1.lds
-TMPFILE2=out/tmp_testcompile2.c
-TMPFILE2o=out/tmp_testcompile2.o
-TMPFILE3o=out/tmp_testcompile3.o
+mkdir -p ${OUT}
+TMPFILE1=${OUT}/tmp_testcompile1.c
+TMPFILE1o=${OUT}/tmp_testcompile1.o
+TMPFILE1_ld=${OUT}/tmp_testcompile1.lds
+TMPFILE2=${OUT}/tmp_testcompile2.c
+TMPFILE2o=${OUT}/tmp_testcompile2.o
+TMPFILE3o=${OUT}/tmp_testcompile3.o
 
 # Test if ld's alignment handling is correct.  This is a known problem
 # with the linker that ships with Ubuntu 11.04.