diff options
Diffstat (limited to 'libcrypt')
-rw-r--r-- | libcrypt/Makefile | 19 |
1 files changed, 14 insertions, 5 deletions
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 |