]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/Makefile
kbuild: create a way to create preprocessor constants from C expressions
[linux-2.6-omap-h63xx.git] / arch / sh / Makefile
index c510c225144fc57a9222af156f98fe8384073cb3..bb06f83e6239c648e138a1d820f0d3e6dab7fa51 100644 (file)
@@ -107,6 +107,7 @@ machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE)   += se/7722
 machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)      += se/7751
 machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE)      += se/7780
 machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE)      += se/7343
+machdir-$(CONFIG_SH_7721_SOLUTION_ENGINE)      += se/7721
 machdir-$(CONFIG_SH_HP6XX)                     += hp6xx
 machdir-$(CONFIG_SH_DREAMCAST)                 += dreamcast
 machdir-$(CONFIG_SH_MPC1211)                   += mpc1211
@@ -154,7 +155,11 @@ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
 
 boot := arch/sh/boot
 
+ifneq ($(KBUILD_SRC),)
 incdir-prefix  := $(srctree)/include/asm-sh/
+else
+incdir-prefix  :=
+endif
 
 #      Update machine arch and proc symlinks if something which affects
 #      them changed.  We use .arch and .mach to indicate when they were
@@ -182,7 +187,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
        $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
        $(Q)rm -f include/asm-sh/mach
        $(Q)for i in $(incdir-y); do \
-       if [ -d $(incdir-prefix)$$i ]; then \
+       if [ -d $(srctree)/include/asm-sh/$$i ]; then \
                echo -n '  SYMLINK include/asm-sh/mach -> '; \
                echo -e "include/asm-sh/$$i"; \
                ln -fsn $(incdir-prefix)$$i \
@@ -191,7 +196,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
                if [ ! -d include/asm-sh/mach ]; then \
                        echo -n '  SYMLINK include/asm-sh/mach -> '; \
                        echo -e 'include/asm-sh'; \
-                       ln -fsn $(incdir-prefix) include/asm-sh/mach; \
+                       ln -fsn $(incdir-prefix)../asm-sh include/asm-sh/mach; \
                fi; \
        fi; \
        done