################ 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
# 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
Support generation of ACPI tables.
endmenu
-source ../vgasrc/Kconfig
+source vgasrc/Kconfig
menu "Debugging"
config DEBUG_LEVEL
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.