1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Refine previous revision to allow acpi_wakecode.h to be safely built

from both the acpi module build directory and a kernel build directory.
The latter didn't work when one attempted to build a kernel which had
"device acpi" with the "make kernel-toolchain buildkernel" command
because a cross-compiler couldn't find anything in the standard system
include path (it's empty in the kernel-toolchain case).

Fix this by passing a better root path to kernel headers (src/sys)
which works for both cases, kernel and module (-I@ only worked for
module).

Also, while here, pass -nostdinc (and a different spelling for icc) --
it's a feature that the kernel source tree is self-contained, and this
change enforces this.

Reported by:	glebius
This commit is contained in:
Ruslan Ermilov 2006-09-06 14:23:40 +00:00
parent 2c857a9be9
commit 4962065404
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162065

View File

@ -9,7 +9,13 @@ DEPENDFILE=
MAKESRCPATH= ${.CURDIR}
CLEANFILES= acpi_wakecode.h acpi_wakecode.bin acpi_wakecode.o
.endif
CFLAGS+= -I. -I@
.if ${CC} == "icc"
CFLAGS+= -restrict
NOSTDINC= -X
.else
NOSTDINC= -nostdinc
.endif
CFLAGS+= ${NOSTDINC} -I. -I${MAKESRCPATH}/../..
all: acpi_wakecode.h