summaryrefslogtreecommitdiff
path: root/server/Makefile.in
blob: f281ba41ff3526047281bd7e35c6edcd1b6e5d14 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#!gmake
#
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
includedir = @includedir@
libdir = @libdir@
libexecdir = @libexecdir@
bindir = @bindir@
sbindir = @sbindir@
mandir = @mandir@
VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
sharedbuilddir = @sharedbuilddir@
INSTALLCMD = @INSTALL@
EXTRA_OBJ=@EXTRA_OBJ@
SSSD_LIBEXEC_PATH = @SSSD_LIBEXEC_PATH@
SSSD_LIBDIR = $(libdir)/@PACKAGE_NAME@
SSSD_INTROSPECT_PATH = @SSSD_INTROSPECT_PATH@
PACKAGE_VERSION = @PACKAGE_VERSION@
srvdir = $(srcdir)

TALLOC_LIBS = @TALLOC_LIBS@
TALLOC_CFLAGS = @TALLOC_CFLAGS@

TDB_LIBS = @TDB_LIBS@
TDB_CFLAGS = @TDB_CFLAGS@

EVENTS_LIBS = @EVENTS_LIBS@
EVENTS_CFLAGS = @EVENTS_CFLAGS@

POPT_LIBS = @POPT_LIBS@
POPT_CFLAGS = @POPT_CFLAGS@

LDB_LIBS = @LDB_LIBS@
LDB_CFLAGS = @LDB_CFLAGS@

DBUS_LIBS = @DBUS_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@

CHECK_LIBS = @CHECK_LIBS@
CHECK_CFLAGS = @CHECK_CFLAGS@

LIBDL = @LIBDL@

SHLIBEXT = @SHLIBEXT@

LD_EXPORT_DYNAMIC = @LD_EXPORT_DYNAMIC@
SHLD = @SHLD@
SHLD_FLAGS = @SHLD_FLAGS@
SONAMEFLAG = @SONAMEFLAG@

LDFLAGS += @LDFLAGS@ -L$(srcdir)/lib
LIBS = @LIBS@ $(TALLOC_LIBS) $(TDB_LIBS) $(EVENTS_LIBS) $(POPT_LIBS) $(LDB_LIBS) $(DBUS_LIBS)

PICFLAG = @PICFLAG@
CFLAGS += -g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
       $(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) $(EVENTS_CFLAGS) $(LDB_CFLAGS) $(DBUS_CFLAGS) $(CHECK_CFLAGS)\
	-DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"$(SHLIBEXT)\" -DSSSD_LIBEXEC_PATH=\"$(SSSD_LIBEXEC_PATH)\" -DSSSD_INTROSPECT_PATH=\"$(SSSD_INTROSPECT_PATH)\"\
	-DUSE_MMAP=1 @CFLAGS@

MDLD = @MDLD@
MDLD_FLAGS = @MDLD_FLAGS@

HAVE_INFOPIPE = @HAVE_INFOPIPE@
HAVE_POLICYKIT = @HAVE_POLICYKIT@

MEMBEROF_SOBASE=memberof.$(SHLIBEXT)
MEMBEROF_SONAME=$(MEMBEROF_SOBASE).0
MEMBEROF_SOLIB=$(MEMBEROF_SOBASE).$(PACKAGE_VERSION)

PROXY_BE_SOBASE=libsss_proxy.$(SHLIBEXT)
PROXY_BE_SONAME=$(PROXY_BE_SOBASE).0
PROXY_BE_SOLIB=$(PROXY_BE_SOBASE).$(PACKAGE_VERSION)

default: all

include $(srvdir)/rules.mk
include $(srvdir)/server.mk

OBJS = $(SERVER_OBJ) @LIBREPLACEOBJ@ $(EXTRA_OBJ)

headers =

DBUS_SYSBUS_POLICY_DIR = @sysconfdir@/dbus-1/system.d

LIBEXECBINS =  sbin/sssd_nss sbin/sssd_dp sbin/sssd_be
ifneq (x$(HAVE_INFOPIPE), x)
    LIBEXECBINS += sbin/sssd_info
    DBUS_SYSBUS_POLICIES = infopipe/org.freeipa.sssd.infopipe.conf
    INFP_INTROSPECT_XML = infopipe/org.freeipa.sssd.infopipe.Introspect.xml
endif
ifneq (x$(HAVE_POLICYKIT), x)
    LIBEXECBINS += sbin/sssd_pk
endif
BINS = sbin/sssd $(LIBEXECBINS)
TESTS = tests/sysdb-tests

SOLIBS = lib/$(MEMBEROF_SOLIB) lib/$(PROXY_BE_SOLIB)
SONAMELIBS = lib/$(PROXY_BE_SONAME) lib/$(MEMBEROF_SONAME)
SOBASELIBS = lib/$(PROXY_BE_SOBASE) lib/$(MEMBEROF_SOBASE)

DIRS = sbin lib

all: showflags dirs $(OBJS) $(BINS) $(SOBASELIBS)

shared-build: all

tests: all $(TESTS)

dirs:
	@mkdir -p $(DIRS)

clean::
	rm -f $(OBJS) $(BINS) $(MODULES)
	rm -f *.o */*.o */*/*.o
	rm -f $(BINS) $(TESTS)
	rm -f $(BINS) $(TESTS)
	rm -f $(SOBASELIBS) $(SONAMELIBS) $(SOLIBS)

distclean:: clean
	rm -rf $(DIRS)
	rm -f config.log config.status config.cache config.h
	rm -f Makefile

realdistclean:: distclean
	rm -f configure config.h.in

install:: all installdirs installheaders installlibs installbin installsupport
	${INSTALLCMD} -d $(DESTDIR)$(sbindir)
	${INSTALLCMD} -m 755 sbin/sssd $(DESTDIR)$(sbindir)
	${INSTALLCMD} -d $(DESTDIR)$(SSSD_LIBEXEC_PATH)
	${INSTALLCMD} -m 755 $(LIBEXECBINS) $(DESTDIR)$(SSSD_LIBEXEC_PATH)

installdirs::
	mkdir -p $(DESTDIR)$(includedir) \
	          $(DESTDIR)$(libdir) \
	          $(DESTDIR)$(sbindir) \
	          $(DESTDIR)$(DBUS_SYSBUS_POLICY_DIR) \
	          $(DESTDIR)$(SSSD_INTROSPECT_PATH)/infopipe

installheaders:: installdirs
ifneq (x$(headers), x)
	cp $(headers) $(DESTDIR)$(includedir)
endif

installlibs:: installdirs
ifneq (x$(STATICLIB)$(LIBSOLIB), x)
	cp $(STATICLIB) $(LIBSOLIB) $(DESTDIR)$(SSSD_LIBDIR)
endif
	${INSTALLCMD} -m 755 $(SOLIBS) $(DESTDIR)$(SSSD_LIBDIR)
	ln -fs $(PROXY_BE_SOLIB) $(DESTDIR)$(SSSD_LIBDIR)/$(PROXY_BE_SONAME)
	ln -fs $(PROXY_BE_SOLIB) $(DESTDIR)$(SSSD_LIBDIR)/$(PROXY_BE_SOBASE)
	ln -fs $(MEMBEROF_SOLIB) $(DESTDIR)$(SSSD_LIBDIR)/$(MEMBEROF_SONAME)
	ln -fs $(MEMBEROF_SOLIB) $(DESTDIR)$(SSSD_LIBDIR)/$(MEMBEROF_SOBASE)

installbin:: installdirs

installsupport:: installdirs
ifneq (x$(HAVE_INFOPIPE), x)
	cp $(DBUS_SYSBUS_POLICIES) $(DESTDIR)$(DBUS_SYSBUS_POLICY_DIR)
	cp $(INFP_INTROSPECT_XML) $(DESTDIR)$(SSSD_INTROSPECT_PATH)/infopipe
endif