(compare_entry): Partially undo patch made by Klaus Espenlaub. There
[glibc/history.git] / md5-crypt / Makefile
blobb52e1ef01201a3c8a24d06ace1ee3a2bb35e59df
1 # Copyright (C) 1996, 1997 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB. If not,
16 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
20 # Sub-makefile for MD5 crypt portion of the library.
22 subdir := md5-crypt
24 headers := crypt.h
26 distribute := md5.h
28 tests := md5test md5c-test
30 extra-libs := libcrypt
31 extra-libs-others := $(extra-libs)
33 md5-routines := crypt-entry md5-crypt md5
34 libcrypt-routines := $(md5-routines)
35 libcrypt-map := libcrypt.map
37 onlymd5-routines := onlymd5-entry md5-crypt md5
38 distribute += onlymd5-entry.c
39 extra-objs := onlymd5-entry.o
41 include ../Makeconfig
43 rpath-link := $(common-objpfx)md5-crypt:$(rpath-link)
45 ifeq ($(crypt-in-libc),yes)
46 routines += $(libcrypt-routines)
47 endif
49 $(objpfx)md5test: $(objpfx)md5.o
51 include ../Rules
53 ifeq ($(build-shared),yes)
54 libdepend = $(common-objpfx)md5-crypt/libcrypt.so$(libcrypt.so-version)
55 else
56 libdepend = $(common-objpfx)md5-crypt/libcrypt.a
57 endif
59 $(objpfx)md5test $(objpfx)md5c-test: $(libdepend)
61 .PHONY: libmd5crypt
62 libmd5crypt: $(foreach o,$(object-suffixes), \
63 $(addprefix $(objpfx),$(patsubst %,$(libtype$o),md5crypt)))
64 ifeq ($(build-shared),yes)
65 libmd5crypt: $(objpfx)libmd5crypt.so
66 endif
68 define o-iterator-doit
69 $(objpfx)$(patsubst %,$(libtype$o),md5crypt): \
70 $(onlymd5-routines:%=$(objpfx)%$o); $$(build-extra-lib)
71 endef
72 object-suffixes-left = $(object-suffixes)
73 include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes))
75 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
76 # This ensures they will load libc.so for needed symbols if loaded by
77 # a statically-linked program that hasn't already loaded it.
78 $(objpfx)libcrypt.so: $(common-objpfx)libc.so
79 $(objpfx)libmd5crypt.so: $(common-objpfx)libc.so