No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / lib / auth / pam / Makefile.am
blobb053521736b500e62c06272948bb8c78842ebddf
1 # $Heimdal: Makefile.am 22299 2007-12-14 06:39:19Z lha $
2 # $NetBSD$
4 include $(top_srcdir)/Makefile.am.common
6 AM_CPPFLAGS += $(INCLUDE_krb4)
8 WFLAGS += $(WFLAGS_NOIMPLICITINT)
10 DEFS = @DEFS@
12 ## this is horribly ugly, but automake/libtool doesn't allow us to
13 ## unconditionally build shared libraries, and it does not allow us to
14 ## link with non-installed libraries
16 if KRB4
17 KAFS=$(top_builddir)/lib/kafs/.libs/libkafs.a
18 KAFS_S=$(top_builddir)/lib/kafs/.libs/libkafs.so
20 L = \
21         $(KAFS)                                         \
22         $(top_builddir)/lib/krb/.libs/libkrb.a          \
23         $(LIB_hcrypto_a)                \
24         $(top_builddir)/lib/roken/.libs/libroken.a      \
25         -lc
27 L_shared = \
28         $(KAFS_S)                                       \
29         $(top_builddir)/lib/krb/.libs/libkrb.so         \
30         $(LIB_hcrypto_so)               \
31         $(top_builddir)/lib/roken/.libs/libroken.so     \
32         $(LIB_getpwnam_r)                               \
33         -lc
35 MOD = pam_krb4.so
37 endif
39 foodir = $(libdir)
40 foo_DATA = $(MOD)
42 LDFLAGS = @LDFLAGS@
44 SRCS = pam.c
45 OBJS = pam.o
47 pam_krb4.so: $(OBJS)
48         @if test -f $(top_builddir)/lib/krb/.libs/libkrb.a; then \
49                 echo "$(LIBTOOL) --mode=link --tag=CC $(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L)"; \
50                 $(LIBTOOL) --mode=link --tag=CC $(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L); \
51         elif test -f $(top_builddir)/lib/krb/.libs/libkrb.so; then \
52                 echo "$(LIBTOOL) --mode=link --tag=CC $(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L_shared)"; \
53                 $(LIBTOOL) --mode=link --tag=CC $(CC) -shared -o $@ $(LDFLAGS) $(OBJS) $(L_shared); \
54         else \
55                 echo "missing libraries"; exit 1; \
56         fi
58 CLEANFILES = $(MOD) $(OBJS)
60 SUFFIXES += .c .o
62 # XXX inline COMPILE since automake wont add it
64 .c.o:
65         $(LIBTOOL) --mode=compile --tag=CC $(CC) \
66         $(DEFS) $(DEFAULT_AM_CPPFLAGS) $(INCLUDES) $(AM_CPPFLAGS) \
67         $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
68         -c `test -f '$<' || echo '$(srcdir)/'`$<
70 EXTRA_DIST = pam.conf.add $(SRCS)