diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-05-11 21:26:43 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-05-11 21:26:43 +0000 |
commit | 249cb00d9f655778aa8a4519ee3e610a904d694d (patch) | |
tree | 44586e79f5b7c82c46252192638b36b99cf66dad /libcrypt | |
parent | bebf39c4932f6b89ccbf6cc63c32b8d51a2dd11a (diff) |
Rework where libraries get installed to. Now thew will be compiled and
dropped into a uClibc/lib dir when compiling, which will make life a
bit easier when installing and cleaning up. Preface uClibc with 'lib'
so ldconfig will recognize it as a library. Make all libraries have the
uClibc version number attached, making upgrades possible by using the
traditional symlink to the .so name plan.
-Erik
Diffstat (limited to 'libcrypt')
-rw-r--r-- | libcrypt/Makefile | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/libcrypt/Makefile b/libcrypt/Makefile index f4280a4e7..a3cff4fc6 100644 --- a/libcrypt/Makefile +++ b/libcrypt/Makefile @@ -25,13 +25,11 @@ include $(TOPDIR)Rules.mak LIBCRYPT=libcrypt.a LIBCRYPT_SHARED=libcrypt.so +LIBCRYPT_SHARED_FULLNAME=libcrypt-$(MAJOR_VERSION).$(MINOR_VERSION).so TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc CSRC = crypt.c des.c md5.c -COBJS=$(patsubst %.c,%.o, $(CSRC)) - - -OBJS=$(COBJS) +OBJS=$(patsubst %.c,%.o, $(CSRC)) all: $(OBJS) $(LIBCRYPT) @@ -39,28 +37,24 @@ $(LIBCRYPT): ar-target ar-target: $(OBJS) $(AR) $(ARFLAGS) $(LIBCRYPT) $(OBJS) + install -d $(TOPDIR)lib + rm -f $(TOPDIR)lib/$(LIBCRYPT) + install -m 644 $(LIBCRYPT) $(TOPDIR)lib/ -$(COBJS): %.o : %.c +$(OBJS): %.o : %.c $(TARGET_CC) $(CFLAGS) -c $< -o $@ $(STRIPTOOL) -x -R .note -R .comment $*.o $(OBJ): Makefile -shared: $(LIBCRYPT) - $(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; +shared: all + $(TARGET_CC) $(LDFLAGS) -shared -o $(LIBCRYPT_SHARED_FULLNAME) \ + -Wl,-soname,$(LIBCRYPT_SHARED).$(MAJOR_VERSION) $(OBJS) $(TOPDIR)$(SHARED_FULLNAME) + install -d $(TOPDIR)lib + rm -f $(TOPDIR)lib/$(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION) + install -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/; + (cd $(TOPDIR)lib; ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED).$(MAJOR_VERSION)); clean: - rm -f *.[oa] *~ core $(LIBCRYPT_SHARED)* - -.PHONY: dummy - + rm -f *.[oa] *~ core $(LIBCRYPT_SHARED)* $(LIBCRYPT_SHARED_FULLNAME)* |