aboutsummaryrefslogtreecommitdiff
path: root/crypto/heimdal/lib/auth/pam/Makefile.am
blob: 963d2ce5ae98b0b3b92cbb4327b489a99e406f00 (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
62
63
# $Id: Makefile.am,v 1.4 2002/05/19 18:43:44 joda Exp $

include $(top_srcdir)/Makefile.am.common

INCLUDES += $(INCLUDE_krb4)

WFLAGS += $(WFLAGS_NOIMPLICITINT)

DEFS = @DEFS@

## this is horribly ugly, but automake/libtool doesn't allow us to
## unconditionally build shared libraries, and it does not allow us to
## link with non-installed libraries

if KRB4
KAFS=$(top_builddir)/lib/kafs/.libs/libkafs.a
KAFS_S=$(top_builddir)/lib/kafs/.libs/libkafs.so

L = \
	$(KAFS)						\
	$(top_builddir)/lib/krb/.libs/libkrb.a		\
	$(LIB_des_a)		\
	$(top_builddir)/lib/roken/.libs/libroken.a	\
	-lc

L_shared = \
	$(KAFS_S)					\
	$(top_builddir)/lib/krb/.libs/libkrb.so		\
	$(LIB_des_so)		\
	$(top_builddir)/lib/roken/.libs/libroken.so	\
	$(LIB_getpwnam_r)				\
	-lc

MOD = pam_krb4.so

endif

EXTRA_DIST = pam.conf.add

foodir = $(libdir)
foo_DATA = $(MOD)

LDFLAGS = @LDFLAGS@

OBJS = pam.o

pam_krb4.so: $(OBJS)
	@if test -f $(top_builddir)/lib/krb/.libs/libkrb.a; then \
		echo "$(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L)"; \
		$(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L); \
	elif test -f $(top_builddir)/lib/krb/.libs/libkrb.so; then \
		echo "$(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L_shared)"; \
		$(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L_shared); \
	else \
		echo "missing libraries"; exit 1; \
	fi

CLEANFILES = $(MOD) $(OBJS)

SUFFIXES += .c .o

.c.o:
	$(COMPILE) -c $<