added files
[bcm963xx.git] / userapps / opensource / libcreduction / Makefile
index a0c7090..e4766cf 100755 (executable)
@@ -39,6 +39,11 @@ endif
 ifneq ($(LIBOPT),y)
 
 TARGETS := $(LIBDIR)/$(LIBC) $(LIBDIR)/$(LINKER)
+
+ifneq ($(strip $(BUILD_GDBSERVER)),)
+       TARGETS += $(LIBDIR)/libthread_db.so.1
+endif
+
 # Additional libraries to install
 include extralibs.mak
 
@@ -66,7 +71,7 @@ libopt:
            $(SHELL) -e generate_library $(PLATFORM) $(BINARIES); \
        fi
        @if [ "$(PLATFORM)" = "uclibc" ]; then \
-           python ./mklibs.py -D -L $(LIBDIR) --target=$(CROSS_COMPILE) -d $(PLATFORM) $(BINARIES); \
+           python ./mklibs.py -D -L $(LIBDIR) -L $(INSTALL_DIR)/lib --target=$(CROSS_COMPILE) -d $(PLATFORM) $(BINARIES); \
        fi
        
 # Additional libraries to install
@@ -92,8 +97,9 @@ all:
 
 install: libopt
        install $(TARGETS) $(INSTALL_DIR)/lib
+       @cp -f $(LIBDIR)/libdl.so $(INSTALL_DIR)/lib/libdl.so.0
 
 clean:
        @if [ "$(INSTALL_DIR)" != "" -a "$(INSTALL_DIR)" != "/" ]; then rm -f $(INSTALL_DIR)/lib/*; fi
        @if [ "$(PLATFORM)" = "glibc" ]; then rm -f $(PLATFORM)/$(LIBC) $(PLATFORM)/$(LINKER); fi
-       @if [ "$(PLATFORM)" = "uclibc" ]; then rm -f $(PLATFORM)/*; fi  
+       @if [ "$(PLATFORM)" = "uclibc" ]; then rm -f $(PLATFORM)/*.0; fi