No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / lib / auth / sia / Makefile.am
blobd7601536e8b7253b500b9b548a9ba68513da6f1d
1 # $Heimdal: Makefile.am 22304 2007-12-14 12:18:18Z 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 KAFS=$(top_builddir)/lib/kafs/.libs/libkafs.a
17 KAFS_S=$(top_builddir)/lib/kafs/.libs/libkafs.so
19 if KRB5
20 L = \
21         $(KAFS)                                         \
22         $(top_builddir)/lib/krb5/.libs/libkrb5.a        \
23         $(top_builddir)/lib/asn1/.libs/libasn1.a        \
24         $(LIB_krb4)                                     \
25         $(LIB_hcrypto_a)                                        \
26         $(LIB_com_err_a)                                \
27         $(top_builddir)/lib/roken/.libs/libroken.a      \
28         $(LIB_getpwnam_r)                               \
29         -lc
31 L_shared = \
32         $(KAFS_S)                                       \
33         $(top_builddir)/lib/krb5/.libs/libkrb5.so       \
34         $(top_builddir)/lib/asn1/.libs/libasn1.so       \
35         $(LIB_krb4)                                     \
36         $(LIB_hcrypto_so)                                       \
37         $(LIB_com_err_so)                               \
38         $(top_builddir)/lib/roken/.libs/libroken.so     \
39         $(LIB_getpwnam_r)                               \
40         -lc
42 MOD = libsia_krb5.so
44 else
46 L = \
47         $(KAFS)                                         \
48         $(top_builddir)/lib/kadm/.libs/libkadm.a        \
49         $(top_builddir)/lib/krb/.libs/libkrb.a          \
50         $(LIB_hcrypto_a)                \
51         $(top_builddir)/lib/com_err/.libs/libcom_err.a  \
52         $(top_builddir)/lib/roken/.libs/libroken.a      \
53         $(LIB_getpwnam_r)                               \
54         -lc
56 L_shared = \
57         $(KAFS_S)                                       \
58         $(top_builddir)/lib/kadm/.libs/libkadm.so       \
59         $(top_builddir)/lib/krb/.libs/libkrb.so         \
60         $(LIB_hcrypto_so)               \
61         $(top_builddir)/lib/com_err/.libs/libcom_err.so \
62         $(top_builddir)/lib/roken/.libs/libroken.so     \
63         $(LIB_getpwnam_r)                               \
64         -lc
66 MOD = libsia_krb4.so
68 endif
70 foodir = $(libdir)
71 foo_DATA = $(MOD)
73 LDFLAGS = @LDFLAGS@ -rpath $(libdir) -Wl,-hidden -Wl,-exported_symbol -Wl,siad_\* 
75 SRCS = sia.c posix_getpw.c sia_locl.h
76 OBJS = sia.o posix_getpw.o
78 libsia_krb5.so: $(OBJS)
79         @if test -f $(top_builddir)/lib/krb5/.libs/libkrb5.a; then \
80                 echo "$(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L)`"; \
81                 $(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L)`; \
82         elif test -f $(top_builddir)/lib/krb5/.libs/libkrb5.so; then \
83                 echo "$(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L_shared)`"; \
84                 $(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L_shared)`; \
85         else \
86                 echo "missing libraries"; exit 1; \
87         fi
88         ostrip -x $@
90 libsia_krb4.so: $(OBJS)
91         @if test -f $(top_builddir)/lib/krb/.libs/libkrb.a; then \
92                 echo "$(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L)`"; \
93                 $(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L)`; \
94         elif test -f $(top_builddir)/lib/krb/.libs/libkrb.so; then \
95                 echo "$(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L_shared)`"; \
96                 $(CC) -shared -o $@ `$(SHELL) $(srcdir)/make-rpath $(LDFLAGS) $(OBJS) $(L_shared)`; \
97         else \
98                 echo "missing libraries"; exit 1; \
99         fi
100         ostrip -x $@
102 CLEANFILES = $(MOD) $(OBJS) so_locations
104 SUFFIXES += .c .o
106 # XXX inline COMPILE since automake wont add it
108 .c.o:
109         $(CC) $(DEFS) $(DEFAULT_AM_CPPFLAGS) $(INCLUDES) $(AM_CPPFLAGS) \
110         $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
111         -c `test -f '$<' || echo '$(srcdir)/'`$<
113 EXTRA_DIST = sia.c sia_locl.h posix_getpw.c \
114         krb4_matrix.conf krb4+c2_matrix.conf \
115         krb5_matrix.conf krb5+c2_matrix.conf \
116         security.patch \
117         make-rpath $(SRCS)