summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: e4fe1a9bd6a5a5652497fc5831cee76731a2b378 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
AM_CFLAGS = $(LDAP_CFLAGS) $(RUNTIME_CFLAGS) $(TIRPC_CFLAGS) $(RPC_CFLAGS)
AM_LDFLAGS = -module -avoid-version -export-symbols-regex '.*_plugin_init'
LIBPTHREAD = @LIBPTHREAD@
LIBWRAP = @LIBWRAP@
CONFIGURED_LINK_FLAGS = @CONFIGURED_LINK_FLAGS@

plugindir = $(libdir)/dirsrv/plugins

plugin_LTLIBRARIES =
if NIS
plugin_LTLIBRARIES += nisserver-plugin.la
else
endif
if SCHEMA
plugin_LTLIBRARIES += schemacompat-plugin.la
endif

sbin_PROGRAMS = nisserver-plugin-defs
nisserver_plugin_defs_CFLAGS = $(AM_CFLAGS) -DDEFS_NIS_MAIN
nisserver_plugin_defs_SOURCES = defs-nis.c

man_MANS = nisserver-plugin-defs.1

noinst_PROGRAMS = portmap
portmap_CFLAGS = $(AM_CFLAGS) -DPORTMAP_MAIN
portmap_SOURCES = portmap.c
portmap_LDFLAGS = $(LDAP_LIBS) $(RUNTIME_LIBS) $(TIRPC_LIBS) $(LIBWRAP) $(RPC_LIBS) $(LIBPTHREAD)

nisserver_plugin_la_SOURCES = \
	back-nis.c \
	backend.h \
	back-shr.c \
	back-shr.h \
	defs-nis.c \
	defs-nis.h \
	disp-nis.c \
	disp-nis.h \
	format.c \
	format.h \
	map.c \
	map.h \
	nis.c \
	nis.h \
	plug-nis.c \
	plugin.h \
	portmap.c \
	portmap.h \
	wrap.c \
	wrap.h
nisserver_plugin_la_LIBADD = $(LDAP_LIBS) $(RUNTIME_LIBS) $(TIRPC_LIBS) $(LIBWRAP) $(RPC_LIBS) $(LIBPTHREAD) $(CONFIGURED_LINK_FLAGS)

schemacompat_plugin_la_CFLAGS = $(AM_CFLAGS)
schemacompat_plugin_la_SOURCES = \
	back-sch.c \
	back-sch.h \
	backend.h \
	back-shr.c \
	back-shr.h \
	format.c \
	format.h \
	map.c \
	map.h \
	plug-sch.c \
	plugin.h \
	wrap.c \
	wrap.h
schemacompat_plugin_la_LIBADD = $(LDAP_LIBS) $(RUNTIME_LIBS) $(LIBPTHREAD) $(CONFIGURED_LINK_FLAGS)

if USE_NSSWITCH
schemacompat_plugin_la_CFLAGS += $(SSS_NSS_IDMAP_CFLAGS)
schemacompat_plugin_la_SOURCES += back-sch-nss.c
schemacompat_plugin_la_LIBADD += $(SSS_NSS_IDMAP_LIBS)
endif

if USE_PAM
schemacompat_plugin_la_CFLAGS += $(PAM_CFLAGS)
schemacompat_plugin_la_SOURCES += back-sch-pam.c
schemacompat_plugin_la_LIBADD += $(PAM_LIBS)
endif

noinst_LTLIBRARIES = dummy-nis-plugin.la
dummy_nis_plugin_la_SOURCES = \
	disp-nis.c \
	disp-nis.h \
	dummymap.c \
	map.h \
	nis.c \
	nis.h \
	plug-nis.c \
	plugin.h \
	portmap.c \
	portmap.h
dummy_nis_plugin_la_LIBADD = $(LDAP_LIBS) $(RUNTIME_LIBS) -lnsl -lpthread