- add full sysroot support for non-ancient toolchains.
- start to separate usr/lib and lib to match normal system-layout
diff --git a/Makefile b/Makefile
index 63535e1..9133359 100644
--- a/Makefile
+++ b/Makefile
@@ -83,9 +83,12 @@
 # The preferred type of libs we build for the target
 ifeq ($(BR2_PREFER_STATIC_LIB),y)
 LIBTGTEXT=.a
+#PREFERRED_LIB_FLAGS:=--disable-shared --enable-static
 else
 LIBTGTEXT=.so
+#PREFERRED_LIB_FLAGS:=--disable-static --enable-shared
 endif
+PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
 
 
 #############################################################
@@ -146,12 +149,15 @@
 $(STAGING_DIR):
 	@mkdir -p $(STAGING_DIR)/bin
 	@mkdir -p $(STAGING_DIR)/lib
-	@mkdir -p $(STAGING_DIR)/include
-	@mkdir -p $(STAGING_DIR)/usr
-	@mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
-	@ln -snf ../include $(STAGING_DIR)/usr/include
+ifneq ($(findstring y,$(BR2_GCC_VERSION_3_3_5)$(BR2_GCC_VERSION_3_3_6)$(BR2_GCC_VERSION_3_4_2)$(BR2_GCC_VERSION_3_4_3)$(BR2_GCC_VERSION_3_4_4)$(BR2_GCC_VERSION_3_4_5)$(BR2_GCC_VERSION_3_4_6)),y)
+	@mkdir -p $(STAGING_DIR)/usr/lib
+else
+	@ln -snf . $(STAGING_DIR)/usr
+	@mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)
 	@ln -snf ../lib $(STAGING_DIR)/usr/lib
-	@ln -snf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+	@ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
+endif
+	@mkdir -p $(STAGING_DIR)/usr/include
 
 $(TARGET_DIR):
 	mkdir -p $(TARGET_DIR)