Makefile: do not create a symbolic link to arch/${ARCH}/include/asm
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Fri, 1 Nov 2013 01:28:45 +0000 (10:28 +0900)
committerTom Rini <trini@ti.com>
Fri, 8 Nov 2013 14:39:14 +0000 (09:39 -0500)
In-tree build:
  - Do not create a symbolic link
      from include/asm to arch/${ARCH}/include/asm
  - Add ${SRCTREE}/arch/arm/include into the header search path

Out-of-tree build:
  - Do not create a directory ${OBJTREE}/include2
  - Do not create a symbolic link
      from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm
  - Add ${SRCTREE}/arch/arm/include into the header search path

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
config.mk
mkconfig
tools/Makefile
tools/env/Makefile
tools/imls/Makefile

index 91a8f2406b56d505413f2b3be7be17560ad73b35..344138759ca9381bdadbe02323f55fafcf76c9d5 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -257,10 +257,10 @@ endif
 endif
 
 ifneq ($(OBJTREE),$(SRCTREE))
-CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
+CPPFLAGS += -I$(OBJTREE)/include
 endif
 
-CPPFLAGS += -I$(TOPDIR)/include
+CPPFLAGS += -I$(TOPDIR)/include -I$(SRCTREE)/arch/$(ARCH)/include
 CPPFLAGS += -fno-builtin -ffreestanding -nostdinc      \
        -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
 
index 1d06c8ebfed872da5ba35aad364c764376d5c098..40db9910081de9b0ae21c63f58b00ae6b2e23c20 100755 (executable)
--- a/mkconfig
+++ b/mkconfig
@@ -96,17 +96,11 @@ fi
 #
 if [ "$SRCTREE" != "$OBJTREE" ] ; then
        mkdir -p ${OBJTREE}/include
-       mkdir -p ${OBJTREE}/include2
-       cd ${OBJTREE}/include2
-       rm -f asm
-       ln -s ${SRCTREE}/arch/${arch}/include/asm asm
        LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
-       cd ../include
+       cd ${OBJTREE}/include
        mkdir -p asm
 else
-       cd ./include
-       rm -f asm
-       ln -s ../arch/${arch}/include/asm asm
+       cd arch/${arch}/include
 fi
 
 rm -f asm/arch
@@ -122,6 +116,10 @@ if [ "${arch}" = "arm" ] ; then
        ln -s ${LNPREFIX}proc-armv asm/proc
 fi
 
+if [ "$SRCTREE" = "$OBJTREE" ] ; then
+       cd ${SRCTREE}/include
+fi
+
 #
 # Create include file for Make
 #
index ca76f947e5d323830f2573085b0d3120be88df8e..14d94e39a0db45b6783002b590b06e4bf944b035 100644 (file)
@@ -160,7 +160,7 @@ NOPEDOBJS := $(addprefix $(obj),$(NOPED_OBJ_FILES-y))
 #
 HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \
                -idirafter $(SRCTREE)/include \
-               -idirafter $(OBJTREE)/include2 \
+               -idirafter $(SRCTREE)/arch/$(ARCH)/include \
                -idirafter $(OBJTREE)/include \
                -I $(SRCTREE)/lib/libfdt \
                -I $(SRCTREE)/tools \
index 14d131b7b8111af6714eae958f6a987861968735..27892f74d096b56c8440c898e0af73e876b8cf4e 100644 (file)
@@ -14,7 +14,7 @@ HEADERS       := fw_env.h $(OBJTREE)/include/config.h
 
 # Compile for a hosted environment on the target
 HOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
-               -idirafter $(OBJTREE)/include2 \
+               -idirafter $(SRCTREE)/arch/$(ARCH)/include \
                -idirafter $(OBJTREE)/include \
                -idirafter $(SRCTREE)/tools/env \
                -DUSE_HOSTCC \
index e371983275433f8a1cc155701dd8836c7aca96ca..b045df2df01b260108d69318e4b20c21a3d1f7d2 100644 (file)
@@ -37,7 +37,7 @@ LIBFDT_OBJS   := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
 #
 HOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
-               -idirafter $(OBJTREE)/include2 \
+               -idirafter $(SRCTREE)/arch/$(ARCH)/include \
                -idirafter $(OBJTREE)/include \
                -I $(SRCTREE)/lib/libfdt \
                -I $(SRCTREE)/tools \