[brcm47xx] refresh patches and configuration
[openwrt/svn-archive/archive.git] / include / toplevel.mk
index 06b005568ee7058204c5918abeff1243d6b3fe67..eaaf6d37d1c6785ec86a7e3e3b68f06146ea8768 100644 (file)
@@ -23,6 +23,11 @@ export RELEASE
 export REVISION
 export OPENWRTVERSION
 export IS_TTY=$(shell tty -s && echo 1 || echo 0)
+export LD_LIBRARY_PATH:=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib
+export DYLD_LIBRARY_PATH:=$(if $(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib
+
+# make sure that a predefined CFLAGS variable does not disturb packages
+export CFLAGS=
 
 ifeq ($(FORCE),)
   .config scripts/config/conf scripts/config/mconf: tmp/.prereq-build
@@ -45,7 +50,7 @@ prepare-tmpinfo: FORCE
        touch $(TOPDIR)/tmp/.build
 
 .config: ./scripts/config/conf prepare-tmpinfo $(if $(CONFIG_HAVE_DOT_CONFIG),,FORCE)
-       @+if [ \! -f .config ] || ! grep CONFIG_HAVE_DOT_CONFIG .config >/dev/null; then \
+       @+if [ \! -e .config ] || ! grep CONFIG_HAVE_DOT_CONFIG .config >/dev/null; then \
                [ -e $(HOME)/.openwrt/defconfig ] && cp $(HOME)/.openwrt/defconfig .config; \
                $(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
        fi
@@ -72,7 +77,7 @@ oldconfig: scripts/config/conf prepare-tmpinfo FORCE
        $< -$(if $(CONFDEFAULT),$(CONFDEFAULT),o) Config.in
 
 menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
-       if [ \! -f .config -a -e $(HOME)/.openwrt/defconfig ]; then \
+       if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
                cp $(HOME)/.openwrt/defconfig .config; \
        fi
        $< Config.in