xref: /freebsd/crypto/heimdal/lib/kafs/Makefile.am (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
1# $Id$
2
3include $(top_srcdir)/Makefile.am.common
4
5AM_CPPFLAGS += $(AFS_EXTRA_DEFS) $(ROKEN_RENAME)
6
7if KRB5
8DEPLIB_krb5 = ../krb5/libkrb5.la
9krb5_am_workaround = $(INCLUDE_hcrypto) -I$(top_srcdir)/lib/krb5
10else
11DEPLIB_krb5  =
12krb5_am_workaround =
13endif # KRB5
14AM_CPPFLAGS += $(krb5_am_workaround)
15
16
17if AIX
18AFSL_EXP = $(srcdir)/afsl.exp
19
20if AIX4
21AFS_EXTRA_LD = -bnoentry
22else
23AFS_EXTRA_LD = -e _nostart
24endif
25
26if AIX_DYNAMIC_AFS
27AIX_SRC =
28AFS_EXTRA_LIBS = afslib.so
29AFS_EXTRA_DEFS =
30else
31AIX_SRC = afslib.c
32AFS_EXTRA_LIBS =
33AFS_EXTRA_DEFS = -DSTATIC_AFS
34endif
35
36else
37AFSL_EXP =
38AIX_SRC =
39endif # AIX
40
41libkafs_la_LIBADD = $(DEPLIB_krb5) $(LIBADD_roken)
42
43lib_LTLIBRARIES = libkafs.la
44libkafs_la_LDFLAGS = -version-info 5:1:5
45foodir = $(libdir)
46foo_DATA = $(AFS_EXTRA_LIBS)
47# EXTRA_DATA = afslib.so
48
49CLEANFILES= $(AFS_EXTRA_LIBS) $(ROKEN_SRCS)
50
51include_HEADERS = kafs.h
52
53if KRB5
54afskrb5_c =
55endif
56
57if do_roken_rename
58ROKEN_SRCS = resolve.c strtok_r.c strlcpy.c strsep.c
59endif
60
61dist_libkafs_la_SOURCES =			\
62	afssys.c				\
63	afskrb5.c				\
64	common.c				\
65	$(AIX_SRC)				\
66	kafs_locl.h				\
67	afssysdefs.h				\
68	roken_rename.h
69
70nodist_libkafs_la_SOURCES = $(ROKEN_SRCS)
71
72EXTRA_libkafs_la_SOURCES = afskrb5.c afslib.c
73
74EXTRA_DIST = NTMakefile afsl.exp afslib.exp $(man_MANS)
75
76man_MANS = kafs.3
77
78# AIX: this almost works with gcc, but somehow it fails to use the
79# correct ld, use ld instead
80afslib.so: afslib.o
81	ld -o $@ -bM:SRE -bI:$(srcdir)/afsl.exp -bE:$(srcdir)/afslib.exp $(AFS_EXTRA_LD) afslib.o -lc
82
83resolve.c:
84	$(LN_S) $(srcdir)/../roken/resolve.c .
85
86strtok_r.c:
87	$(LN_S) $(srcdir)/../roken/strtok_r.c .
88
89strlcpy.c:
90	$(LN_S) $(srcdir)/../roken/strlcpy.c .
91
92strsep.c:
93	$(LN_S) $(srcdir)/../roken/strsep.c .
94