xref: /freebsd/crypto/heimdal/lib/kafs/Makefile.am (revision 9336e0699bda8a301cd2bfa37106b6ec5e32012e)
1# $Id: Makefile.am,v 1.43.2.1 2003/05/12 15:20:46 joda Exp $
2
3include $(top_srcdir)/Makefile.am.common
4
5INCLUDES += $(AFS_EXTRA_DEFS) $(ROKEN_RENAME)
6
7if KRB4
8DEPLIB_krb4 = $(LIB_krb4) $(LIB_des)
9krb4_am_workaround = $(INCLUDE_krb4)
10else
11DEPLIB_krb4  =
12krb4_am_workaround =
13endif # KRB4
14INCLUDES += $(krb4_am_workaround)
15
16if KRB5
17DEPLIB_krb5 = ../krb5/libkrb5.la
18krb5_am_workaround = $(INCLUDE_des) -I$(top_srcdir)/lib/krb5
19else
20DEPLIB_krb5  =
21krb5_am_workaround =
22endif # KRB5
23INCLUDES += $(krb5_am_workaround)
24
25
26if AIX
27AFSL_EXP = $(srcdir)/afsl.exp
28
29if AIX4
30AFS_EXTRA_LD = -bnoentry
31else
32AFS_EXTRA_LD = -e _nostart
33endif
34
35if AIX_DYNAMIC_AFS
36if HAVE_DLOPEN
37AIX_SRC =
38else
39AIX_SRC = dlfcn.c
40endif
41AFS_EXTRA_LIBS = afslib.so
42AFS_EXTRA_DEFS =
43else
44AIX_SRC = afslib.c
45AFS_EXTRA_LIBS =
46AFS_EXTRA_DEFS = -DSTATIC_AFS
47endif
48
49else
50AFSL_EXP =
51AIX_SRC =
52endif # AIX
53
54libkafs_la_LIBADD = $(DEPLIB_krb5) ../roken/libroken.la $(DEPLIB_krb4)
55
56lib_LTLIBRARIES = libkafs.la
57libkafs_la_LDFLAGS = -version-info 4:0:4
58foodir = $(libdir)
59foo_DATA = $(AFS_EXTRA_LIBS)
60# EXTRA_DATA = afslib.so
61
62CLEANFILES= $(AFS_EXTRA_LIBS) $(ROKEN_SRCS)
63
64include_HEADERS = kafs.h
65
66if KRB5
67afskrb5_c = afskrb5.c
68endif
69
70if KRB4
71afskrb_c = afskrb.c
72endif
73
74
75if do_roken_rename
76ROKEN_SRCS = resolve.c strtok_r.c strlcpy.c strsep.c
77endif
78
79libkafs_la_SOURCES =				\
80	afssys.c				\
81	$(afskrb_c)				\
82	$(afskrb5_c)				\
83	common.c				\
84	$(AIX_SRC)				\
85	kafs_locl.h				\
86	afssysdefs.h				\
87	$(ROKEN_SRCS)
88
89#afslib_so_SOURCES = afslib.c
90
91EXTRA_libkafs_la_SOURCES = afskrb.c afskrb5.c dlfcn.c afslib.c dlfcn.h
92
93EXTRA_DIST = README.dlfcn afsl.exp afslib.exp
94
95man_MANS = kafs.3
96
97# AIX: this almost works with gcc, but somehow it fails to use the
98# correct ld, use ld instead
99afslib.so: afslib.o
100	ld -o $@ -bM:SRE -bI:$(srcdir)/afsl.exp -bE:$(srcdir)/afslib.exp $(AFS_EXTRA_LD) afslib.o -lc
101
102$(OBJECTS): ../../include/config.h
103
104resolve.c:
105	$(LN_S) $(srcdir)/../roken/resolve.c .
106
107strtok_r.c:
108	$(LN_S) $(srcdir)/../roken/strtok_r.c .
109
110strlcpy.c:
111	$(LN_S) $(srcdir)/../roken/strlcpy.c .
112
113strsep.c:
114	$(LN_S) $(srcdir)/../roken/strsep.c .
115