-# $(NO_TRACE_MAKE) -C compat-ldso -f build.mk PKG_INSTALL_DIR="$(PKG_BUILD_DIR)"
-# $(SED) 's,ld-uClibc.so.0,ld-uClibc.brcm,' \
-# $(PKG_BUILD_DIR)/wl \
-# $(PKG_BUILD_DIR)/nas
+
+ # Compile libshared
+ $(MAKE) -C $(PKG_BUILD_DIR)/router/shared \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/include -Dlinux=1" \
+ all
+ $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas \
+ $(PKG_BUILD_DIR)/nas_exe.o \
+ $(PKG_BUILD_DIR)/nvram/nvram_stub.o \
+ $(TARGET_LDFLAGS) \
+ $(PKG_BUILD_DIR)/router/shared/libshared.a
+ $(TARGET_CC) -o $(PKG_BUILD_DIR)/wl $(PKG_BUILD_DIR)/wl_exe.o