diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-08-09 01:54:01 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-08-09 01:54:01 +0200 |
commit | cb4f38e1a55c8af15306261a99fc2be1be27d421 (patch) | |
tree | 6633382809eca7b9deb4a4e42cec610465b435d3 /Makefile | |
parent | 64fc2d35e0007be88f7ee1e3fb6fece74ec8bde1 (diff) | |
download | history-cb4f38e1a55c8af15306261a99fc2be1be27d421.tar.gz |
kbuild: Use LINUXINCLUDE to specify include/ directory
Peter Chubb <peterc@gelato.unsw.edu.au> reported that building i386
on a non-i386 platform failed, because gcc could not locate boot.h.
Root cause was the extra include2 directory used when using O=
to specify the output directory.
Added LINUXINCLUDE as a portable way to specify the include/
directory, and changed the two users.
This avoids hardcoding 'include2' in non-kbuild core files.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile index aef2e1e6f26c06..56b4a072fa962c 100644 --- a/Makefile +++ b/Makefile @@ -294,8 +294,12 @@ AFLAGS_KERNEL = NOSTDINC_FLAGS = -nostdinc -iwithprefix include -CPPFLAGS := -D__KERNEL__ -Iinclude \ - $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) +# Use LINUXINCLUDE when you must reference the include/ directory. +# Needed to be compatible with the O= option +LINUXINCLUDE := -Iinclude \ + $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) + +CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common @@ -306,7 +310,7 @@ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB LDFLAGS_MODULE CHECK -export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS +export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |