File: Makefile.am

package info (click to toggle)
gssproxy 0.8.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,988 kB
  • sloc: ansic: 17,989; sh: 5,011; python: 1,064; xml: 535; makefile: 394
file content (377 lines) | stat: -rw-r--r-- 9,049 bytes parent folder | download
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
SUBDIRS = . tests
#SUBDIRS += po

if HAVE_MANPAGES
SUBDIRS += man
endif

# Some old versions of automake don't define builddir
builddir ?= .

DOXYGEN = @DOXYGEN@

DISTSETUPOPTS =
if HAVE_DEBIAN
DISTSETUPOPTS += --install-layout=deb
endif

gssplibdir = $(libdir)/gssproxy
gsspconfdir = $(sysconfdir)/gssproxy
gssconfdir = $(sysconfdir)/gss
localedir = @localedir@

ccpath = @ccpath@
systemdunitdir = @systemdunitdir@
examplesdir= @datarootdir@/examples
logpath = @logpath@
pubconfpath = @pubconfpath@
pkgconfigdir = $(libdir)/pkgconfig

gpstatedir = @gpstatedir@
gpclidir = @gpstatedir@/clients


AM_DISTCHECK_CONFIGURE_FLAGS = \
    --with-systemdunitdir='$$(prefix)/$(systemdunitdir)'

AM_CPPFLAGS =
AM_CFLAGS =
AM_LDFLAGS =
if WANT_AUX_INFO
    AM_CFLAGS += -aux-info $@.X
endif
AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
    -Wcast-qual -Wcast-align -Wwrite-strings \
    -fstrict-aliasing -Wstrict-aliasing -Werror=strict-aliasing \
    -Werror-implicit-function-declaration \
    -Werror=format-security -Wextra
if BUILD_HARDENING
    AM_CPPFLAGS += -D_FORTIFY_SOURCE=2 -Wdate-time
    AM_CFLAGS += -fPIE -fstack-protector-strong
    AM_LDFLAGS += -fPIE -pie -fPIC -Wl,-z,relro -Wl,-z,now
endif

dist_pkgconfig_DATA =

ACLOCAL_AMFLAGS = -I m4 -I .

sbin_PROGRAMS = \
    gssproxy

check_PROGRAMS = \
    cli_srv_comm interposetest

gssplib_LTLIBRARIES = \
    proxymech.la

dist_noinst_SCRIPTS = tests/scripts/dlopen.sh

dist_noinst_DATA =

###############################
# Global compilation settings #
###############################

AM_CPPFLAGS += \
    -Wall \
    -Iinclude \
    -I$(srcdir)/include \
    -I$(srcdir) \
    -Iinclude \
    -I. \
    $(POPT_CFLAGS) \
    $(GSSAPI_CFLAGS) \
    $(INI_CFLAGS) \
    -DLIBDIR=\"$(libdir)\" \
    -DVARDIR=\"$(localstatedir)\" \
    -DSHLIBEXT=\"$(SHLIBEXT)\" \
    -DSYSCONFDIR=\"$(sysconfdir)\" \
    -DLOCALEDIR=\"$(localedir)\"

GSS_PROXY_LIBS = $(POPT_LIBS) $(KRB5_LIBS) $(VERTO_LIBS) $(INI_LIBS) $(GSSAPI_LIBS) $(GSSRPC_LIBS)

if BUILD_SELINUX
    GSS_PROXY_LIBS += $(SELINUX_LIBS)
endif

GP_RPCGEN_OBJ = rpcgen/gp_rpc_xdr.c rpcgen/gss_proxy_xdr.c rpcgen/gp_xdr.c
GP_RPCCLI_OBJ = \
    src/client/gpm_display_status.c \
    src/client/gpm_accept_sec_context.c \
    src/client/gpm_release_handle.c \
    src/client/gpm_acquire_cred.c \
    src/client/gpm_indicate_mechs.c \
    src/client/gpm_import_and_canon_name.c \
    src/client/gpm_init_sec_context.c \
    src/client/gpm_inquire_context.c \
    src/client/gpm_get_mic.c \
    src/client/gpm_verify_mic.c \
    src/client/gpm_wrap.c \
    src/client/gpm_unwrap.c \
    src/client/gpm_wrap_size_limit.c \
    src/client/gpm_common.c \
    src/gp_util.c

GP_MECHGLUE_OBJ = \
    src/mechglue/gpp_accept_sec_context.c \
    src/mechglue/gpp_acquire_cred.c \
    src/mechglue/gpp_creds.c \
    src/mechglue/gpp_context.c \
    src/mechglue/gpp_init_sec_context.c \
    src/mechglue/gpp_display_status.c \
    src/mechglue/gpp_import_and_canon_name.c \
    src/mechglue/gpp_indicate_mechs.c \
    src/mechglue/gpp_priv_integ.c \
    src/mechglue/gpp_misc.c \
    src/mechglue/gss_plugin.c

dist_noinst_HEADERS = \
    rpcgen/gp_rpc.h \
    rpcgen/gp_xdr.h \
    rpcgen/gss_proxy.h \
    src/gp_rpc_process.h \
    src/gp_proxy.h \
    src/client/gssapi_gpm.h \
    src/gp_common.h \
    src/gp_rpc_debug.h \
    src/gp_log.h \
    src/gp_creds.h \
    src/gp_export.h \
    src/gp_conv.h \
    src/gp_config.h \
    src/gp_debug.h \
    src/gp_rpc_creds.h \
    src/gp_selinux.h \
    src/mechglue/gss_plugin.h


####################
# Program Binaries #
####################

gssproxy_SOURCES = \
    src/gp_config.c \
    src/gp_init.c \
    src/gp_socket.c \
    src/gp_workers.c \
    src/gp_creds.c \
    $(GP_RPCGEN_OBJ) \
    src/gp_rpc_debug.c \
    src/gp_rpc_process.c \
    src/gp_conv.c \
    src/gp_export.c \
    src/gp_debug.c \
    src/gp_log.c \
    src/gp_util.c \
    src/gp_rpc_accept_sec_context.c \
    src/gp_rpc_release_handle.c \
    src/gp_rpc_acquire_cred.c \
    src/gp_rpc_indicate_mechs.c \
    src/gp_rpc_import_and_canon_name.c \
    src/gp_rpc_init_sec_context.c \
    src/gp_rpc_get_mic.c \
    src/gp_rpc_verify_mic.c \
    src/gp_rpc_wrap.c \
    src/gp_rpc_unwrap.c \
    src/gp_rpc_wrap_size_limit.c \
    src/gssproxy.c

proxymech_la_SOURCES = \
    src/gp_conv.c \
    $(GP_RPCGEN_OBJ) \
    $(GP_RPCCLI_OBJ) \
    $(GP_MECHGLUE_OBJ)
proxymech_la_CFLAGS = \
    $(AM_FLAGS)
proxymech_la_LDFLAGS = \
    -avoid-version \
    -module

cli_srv_comm_SOURCES = \
    src/gp_conv.c \
    src/gp_debug.c \
    src/gp_log.c \
    $(GP_RPCGEN_OBJ) \
    $(GP_RPCCLI_OBJ) \
    tests/t_utils.c \
    tests/cli_srv_comm.c

interposetest_SOURCES = \
    src/gp_log.c \
    src/gp_debug.c \
    tests/t_utils.c \
    tests/interposetest.c

gssproxy_LDADD = \
    $(GSS_PROXY_LIBS)

cli_srv_comm_LDADD = \
    $(GSS_PROXY_LIBS)

interposetest_LDADD = \
    $(GSS_PROXY_LIBS)

dist_noinst_DATA += \
    m4

noinst_PROGRAMS = cli_srv_comm interposetest

################
# TRANSLATIONS #
################
update-po:
if HAVE_MANPAGES
	$(MAKE) -C man update-po
endif
#	$(MAKE) -C po update-po

#######################
# Installation Extras #
#######################

systemdunit_DATA =
if HAVE_SYSTEMD_UNIT
    systemdunit_DATA += \
        systemd/gssproxy.service
endif

noinst_DATA = \
    examples/gssproxy.conf \
    examples/24-nfs-server.conf \
    examples/80-httpd.conf \
    examples/99-nfs-client.conf \
    examples/mech

edit_cmd = $(SED) \
    -e 's|@sbindir[@]|$(sbindir)|g' \
    -e 's|@localstatedir[@]|$(localstatedir)|g' \
    -e 's|@libdir[@]|$(libdir)|g' \
    -e 's|@gpclidir[@]|$(gpclidir)|g'

replace_script = \
    @rm -f $@ $@.tmp; \
    srcdir=''; \
        test -f ./$@.in || srcdir=$(srcdir)/; \
        $(edit_cmd) $${srcdir}$@.in >$@.tmp; \
    mv $@.tmp $@

EXTRA_DIST = \
    systemd/gssproxy.service.in \
    examples/gssproxy.conf.in \
    examples/24-nfs-server.conf.in \
    examples/80-httpd.conf.in \
    examples/99-nfs-client.conf.in \
    examples/mech.in

systemd/gssproxy.service: systemd/gssproxy.service.in Makefile
	@$(MKDIR_P) systemd/
	$(replace_script)

examples/%.conf: examples/%.conf.in Makefile
	@$(MKDIR_P) examples/
	$(replace_script)

examples/mech: examples/mech.in Makefile
	@$(MKDIR_P) examples/
	$(replace_script)

installgsspdirs::
	mkdir -p \
    $(DESTDIR)$(includedir) \
    $(DESTDIR)$(libdir) \
    $(DESTDIR)$(sbindir) \
    $(DESTDIR)$(mandir) \
    $(DESTDIR)$(gsspconfdir) \
    $(DESTDIR)$(gssconfdir) \
    $(DESTDIR)$(logpath) \
    $(DESTDIR)$(gpstatedir) \
    $(DESTDIR)$(gpclidir) \
    $(DESTDIR)$(pubconfpath)

if HAVE_DOXYGEN
docs:
	$(DOXYGEN) doxy.config
else
docs:
	@echo "Doxygen not installed, cannot generate documentation"
	@exit 1
endif

install-exec-hook: installgsspdirs
	mkdir -p doc $(DESTDIR)/$(docdir); cp -a doc $(DESTDIR)/$(docdir)/
if HAVE_SYSTEMD_UNIT
	mkdir -p $(DESTDIR)$(systemdunitdir)
endif

clean-local:
	rm -Rf doc
	rm -Rf testdir

CLEANFILES = *.X */*.X */*/*.X \
    examples/mech \
    examples/gssproxy.conf \
    examples/24-nfs-server.conf \
    examples/80-httpd.conf \
    examples/99-nfs-client.conf \
    systemd/gssproxy.service

check: all $(check_PROGRAMS)
	$(srcdir)/tests/runtests.py $(CHECKARGS)

tests: check

# RPM-related tasks

RPMBUILD ?= $(PWD)/rpmbuild

dist_noinst_DATA += \
    m4 \
    contrib/gssproxy.spec.in \
    BUILD.txt \
    COPYING

rpmroot:
	mkdir -p $(RPMBUILD)/BUILD
	mkdir -p $(RPMBUILD)/RPMS
	mkdir -p $(RPMBUILD)/SOURCES
	mkdir -p $(RPMBUILD)/SPECS
	mkdir -p $(RPMBUILD)/SRPMS

rpms: dist-gzip rpmroot
	cp $(builddir)/contrib/gssproxy.spec $(RPMBUILD)/SPECS
	cp $(distdir).tar.gz $(RPMBUILD)/SOURCES
	cd $(RPMBUILD); \
	rpmbuild --define "_topdir $(RPMBUILD)" -ba SPECS/gssproxy.spec

if GIT_CHECKOUT
prerelease-rpms:
	cp $(srcdir)/version.m4 $(srcdir)/version.m4.orig
	sed -e "s/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.*\])/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.`date +%Y%m%d.%H%M`.git`git log -1 --pretty=format:%h`\])/" < $(srcdir)/version.m4.orig > $(srcdir)/version.m4
	$(MAKE) rpms
	mv $(srcdir)/version.m4.orig $(srcdir)/version.m4
endif

# make srpms will use the old digest algorithm to be compatible
# with RHEL5
srpm: dist-gzip rpmroot
	cp $(builddir)/contrib/gssproxy.spec $(RPMBUILD)/SPECS
	cp $(distdir).tar.gz $(RPMBUILD)/SOURCES
	cd $(RPMBUILD); \
	rpmbuild --define "_topdir $(RPMBUILD)" \
	         --define _source_filedigest_algorithm=1 \
	         -bs SPECS/gssproxy.spec

if GIT_CHECKOUT
prerelease-srpm:
	cp $(srcdir)/version.m4 $(srcdir)/version.m4.orig
	sed -e "s/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.*\])/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.`date +%Y%m%d.%H%M`.git`git log -1 --pretty=format:%h`\])/" < $(srcdir)/version.m4.orig > $(srcdir)/version.m4
	$(MAKE) srpm
	mv $(srcdir)/version.m4.orig $(srcdir)/version.m4
endif

####################
# Testing          #
####################

test_proxymech:
	TMPDIR=tests/scripts/ $(srcdir)/tests/scripts/dlopen.sh ./.libs/proxymech.so || exit 1