summaryrefslogtreecommitdiff
path: root/libcrypt
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-04-27 07:05:59 +0000
committerEric Andersen <andersen@codepoet.org>2001-04-27 07:05:59 +0000
commit9325f0b9fa863dfdf8c4d94203a2c7109f09f862 (patch)
tree8369f8117e2dab6788d3873f029a5cf3d1ff669e /libcrypt
parentc48ae5155fd2222dd84572a24d77c4d01c81c32a (diff)
A few more compilation updates
Diffstat (limited to 'libcrypt')
-rw-r--r--libcrypt/Makefile19
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