summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--ldso/Makefile13
-rw-r--r--libcrypt/Makefile19
3 files changed, 29 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index a7aab38d6..10eb8119b 100644
--- a/Makefile
+++ b/Makefile
@@ -28,15 +28,15 @@
include Rules.mak
-DIRS = misc pwd_grp stdio string termios inet signal stdlib sysdeps unistd extra
+DIRS = extra misc pwd_grp stdio string termios inet signal stdlib sysdeps unistd crypt
ifeq ($(strip $(HAS_MMU)),true)
DO_SHARED=shared
endif
-all: $(LIBNAME) $(DO_SHARED) done
+all: halfclean headers uClibc_config.h subdirs $(LIBNAME) $(DO_SHARED) done
-$(LIBNAME): halfclean headers uClibc_config.h subdirs
+$(LIBNAME): subdirs
$(CROSS)ranlib $(LIBNAME)
shared: $(LIBNAME)
@@ -57,6 +57,7 @@ shared: $(LIBNAME)
@rm -rf tmp
ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME)
ln -sf $(SHARED_MAJORNAME) libc.so
+ @make -C crypt shared
@make -C ld.so-1
done: $(LIBNAME) $(DO_SHARED)
@@ -66,7 +67,7 @@ done: $(LIBNAME) $(DO_SHARED)
halfclean:
@rm -f $(LIBNAME) crt0.o uClibc_config.h
- @rm -f $(SHARED_FULLNAME) $(SHARED_MAJORNAME) libc.so
+ @rm -f $(SHARED_FULLNAME) $(SHARED_MAJORNAME) uClibc-0.* libc.so*
headers: dummy
@rm -f include/asm include/linux include/bits
@@ -111,12 +112,13 @@ install: install_runtime install_dev install_ldso
# Installs shared library
install_runtime:
+ @make -C crypt install
ifneq ($(DO_SHARED),)
install -d $(INSTALL_DIR)/lib
rm -rf $(INSTALL_DIR)/lib/$(SHARED_FULLNAME)
rm -rf $(INSTALL_DIR)/lib/$(SHARED_MAJORNAME)
rm -rf $(INSTALL_DIR)/lib/libc.so
- install -m 644 $(SHARED_FULLNAME) $(INSTALL_DIR)/lib/
+ install -m 755 $(SHARED_FULLNAME) $(INSTALL_DIR)/lib/
(cd $(INSTALL_DIR)/lib;ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME))
(cd $(INSTALL_DIR)/lib;ln -sf $(SHARED_MAJORNAME) libc.so)
# ldconfig is really not necessary, and impossible to cross
@@ -152,6 +154,7 @@ install_dev:
install_ldso:
ifeq ($(strip $(DO_SHARED)),shared)
@make -C ld.so-1 install
+ $(TOPDIR)ld.so-1/util/ldconfig
else
@echo "Skipping shared library support"
endif
@@ -200,5 +203,5 @@ uClibc_config.h: Config
echo "#undef NO_UNDERSCORES" >> uClibc_config.h ; \
fi
-.PHONY: dummy
+.PHONY: dummy subdirs
diff --git a/ldso/Makefile b/ldso/Makefile
index bb9328a5c..a93c6f552 100644
--- a/ldso/Makefile
+++ b/ldso/Makefile
@@ -2,19 +2,18 @@ TOPDIR=../
include Rules.mak
SUBDIRS = util d-link libdl # man
-TARGETDIR=/usr/$(TARGET_ARCH)-linux-uclibc
-
all:
set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d ; done
install: all
- mkdir -p $(TARGETDIR)/etc
- mkdir -p $(TARGETDIR)/lib
- cp -a ./d-link/$(DLINKER).$(LDSO_VMAJOR) \
- ./libdl/$(LIBDL).$(LDSO_VMAJOR) $(TARGETDIR)/lib
- ./util/ldconfig
+ install -d $(INSTALL_DIR)/lib
+ install -d $(INSTALL_DIR)/etc
+ install -m 755 ./d-link/$(DLINKER).$(LDSO_VMAJOR) $(INSTALL_DIR)/lib/
+ install -m 644 ./libdl/$(LIBDL).$(LDSO_VMAJOR) $(INSTALL_DIR)/lib/
+ (cd $(INSTALL_DIR)/lib/;ln -sf $(DLINKER).$(LDSO_VMAJOR) $(DLINKER))
+ (cd $(INSTALL_DIR)/lib/;ln -sf $(LIBDL).$(LDSO_VMAJOR) $(LIBDL))
clean:
set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d $@ ; done
diff --git a/libcrypt/Makefile b/libcrypt/Makefile
index 904d674ab..15d8ad534 100644
--- a/libcrypt/Makefile
+++ b/libcrypt/Makefile
@@ -22,8 +22,9 @@
TOPDIR=../
include $(TOPDIR)Rules.mak
+
LIBCRYPT=libcrypt.a
-SHARED_NAME=libcrypt.so.$(MAJOR_VERSION)
+LIBCRYPT_SHARED=libcrypt.so
TARGET_CC= ../extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
CSRC = crypt.c des.c md5.c
@@ -32,7 +33,7 @@ COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(COBJS)
-all: $(OBJS) $(LIBCRYPT) shared
+all: $(OBJS) $(LIBCRYPT)
$(LIBCRYPT): ar-target
@@ -46,11 +47,19 @@ $(COBJS): %.o : %.c
$(OBJ): Makefile
shared: $(LIBCRYPT)
- $(TARGET_CC) $(LDFLAGS) -shared -o $(SHARED_NAME) \
- -Wl,-soname,$(SHARED_NAME) $(COBJS) $(TOPDIR)$(SHARED_FULLNAME)
+ $(TARGET_CC) $(LDFLAGS) -shared -o $(LIBCRYPT_SHARED).$(MAJOR_VERSION) \
+ -Wl,-soname,$(LIBCRYPT_SHARED).$(MAJOR_VERSION) $(COBJS) $(TOPDIR)$(SHARED_FULLNAME)
+
+install: all
+ install -d $(INSTALL_DIR)/lib
+ install -m 644 $(LIBCRYPT) $(INSTALL_DIR)/lib/
+ @if [ -f $(LIBCRYPT_SHARED).$(MAJOR_VERSION) ] ; then \
+ install -m 644 $(LIBCRYPT_SHARED).$(MAJOR_VERSION) $(INSTALL_DIR)/lib/; \
+ (cd $(INSTALL_DIR)/lib/;ln -sf $(LIBCRYPT_SHARED).$(MAJOR_VERSION) $(LIBCRYPT_SHARED)); \
+ fi;
clean:
- rm -f *.[oa] *~ core $(SHARED_NAME)
+ rm -f *.[oa] *~ core $(LIBCRYPT_SHARED)*
.PHONY: dummy