aboutsummaryrefslogtreecommitdiff
path: root/secure/lib/libcrypt/Makefile
blob: 512eb57b4a789502f9018bf73ab4bed63c5d3ee7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# $Id: Makefile,v 1.15 1999/01/23 08:26:01 markm Exp $
#

LCRYPTBASE=     libcrypt
LDCRYPTBASE=    libdescrypt

.if ${OBJFORMAT} != elf
LCRYPTSO=       $(LCRYPTBASE).so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
LDCRYPTSO=      $(LDCRYPTBASE).so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
.else
LCRYPTSO=       $(LCRYPTBASE).so.$(SHLIB_MAJOR)
LDCRYPTSO=      $(LDCRYPTBASE).so.$(SHLIB_MAJOR)
.endif

.PATH:	${.CURDIR}/../../../lib/libmd

LIB=	descrypt
SRCS=	crypt.c crypt-md5.c md5c.c
MAN3=	crypt.3
CFLAGS+=	-I${.CURDIR}/../../../lib/libmd -Wall
PRECIOUSLIB=	yes

.if ${OBJFORMAT} == elf
SONAME=	${LCRYPTBASE}.so.$(SHLIB_MAJOR)
.endif

test:
	cd test ; make test ; make clean

.include <bsd.lib.mk>

# We only install the links if they do not already exist.
# This may have to be revised
afterinstall:
.if !defined(NOPIC) && defined(SHLIB_MAJOR)
	@cd $(DESTDIR)/$(LIBDIR); \
	if [ ! -e $(LCRYPTSO) ]; then \
	rm -f $(LCRYPTSO); \
	ln -sf $(LDCRYPTSO) $(LCRYPTSO); \
	fi
.endif
.if !defined(NOPIC) && defined(SHLIB_MAJOR) && ${OBJFORMAT} == elf
	@cd $(DESTDIR)/$(LIBDIR); \
	if [ ! -e $(LCRYPTBASE).so ]; then \
	rm -f $(LCRYPTBASE).so; \
	ln -sf $(LDCRYPTBASE).so libcrypt.so; \
	fi
.endif
	@cd  $(DESTDIR)/$(LIBDIR); \
	if [ ! -e $(LCRYPTBASE).a ]; then \
	rm -f $(LCRYPTBASE).a; \
	ln -sf $(LDCRYPTBASE).a libcrypt.a; \
	fi
.if !defined(NOPROFILE)
	@cd  $(DESTDIR)/$(LIBDIR); \
	if [ ! -e $(LCRYPTBASE)_p.a ]; then \
	rm -f $(LCRYPTBASE)_p.a; \
	ln -sf $(LDCRYPTBASE)_p.a libcrypt_p.a; \
	fi
.endif