File: Makefile.am

package info (click to toggle)
gss-ntlmssp 0.7.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 2,168 kB
  • ctags: 884
  • sloc: ansic: 9,283; sh: 4,373; makefile: 241; xml: 150
file content (241 lines) | stat: -rw-r--r-- 5,403 bytes parent folder | download | duplicates (2)
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
SUBDIRS =
#SUBDIRS += po

if HAVE_MANPAGES
SUBDIRS += man
endif
if HAVE_NLS
SUBDIRS += po
endif

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

DOXYGEN = @DOXYGEN@

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

gssconfdir = $(sysconfdir)/gss
gssntlmsspdir = $(libdir)/gssntlmssp
localedir = @localedir@

pkgconfigdir = $(libdir)/pkgconfig

AM_CFLAGS =
if WANT_AUX_INFO
    AM_CFLAGS += -aux-info $@.X
endif
if HAVE_GCC
    AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
                 -Wcast-qual -Wcast-align -Wwrite-strings \
                 -Werror-implicit-function-declaration \
                 -fno-strict-aliasing
endif
if HAVE_NLS
    AM_CFLAGS += -DLOCALEDIR="\"$(localedir)\""
endif

dist_pkgconfig_DATA =

ACLOCAL_AMFLAGS = -I m4 -I .

check_PROGRAMS = \
    ntlmssptest

gssntlmssp_LTLIBRARIES = \
    gssntlmssp.la

dist_noinst_SCRIPTS = tests/scripts/dlopen.sh

dist_noinst_DATA =

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

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

#EXTRA_DIST = build/config.rpath

GN_MECHGLUE_LIBS = $(GSSAPI_LIBS) $(CRYPTO_LIBS) $(WBC_LIBS)

GN_MECHGLUE_OBJ = \
    src/crypto.c \
    src/ntlm_crypto.c \
    src/ntlm.c \
    src/debug.c \
    src/gss_err.c \
    src/gss_spi.c \
    src/gss_names.c \
    src/gss_creds.c \
    src/gss_sec_ctx.c \
    src/gss_signseal.c \
    src/gss_serialize.c \
    src/external.c \
    src/gss_auth.c \
    src/gss_ntlmssp.c

if BUILD_WBCLIENT
   GN_MECHGLUE_OBJ += src/winbind.c
endif

dist_noinst_HEADERS = \
    src/crypto.h \
    src/ntlm_common.h \
    src/ntlm.h \
    src/debug.h \
    src/gss_ntlmssp.h \
    src/gss_ntlmssp_winbind.h

gssapidir = $(includedir)/gssapi
dist_gssapi_HEADERS = \
    src/gssapi_ntlmssp.h

POTFILES = src/gss_err.c

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

gssntlmssp_la_SOURCES = \
    $(GN_MECHGLUE_OBJ)
gssntlmssp_la_CFLAGS = \
    $(WBC_CFLAGS) \
    $(AM_CFLAGS)
gssntlmssp_la_LDFLAGS = \
    $(GN_MECHGLUE_LIBS) \
    -export-symbols-regex '^gss(spi|)_' \
    -avoid-version \
    -module

ntlmssptest_SOURCES = \
    $(GN_MECHGLUE_OBJ) \
    tests/ntlmssptest.c
ntlmssptest_CFLAGS = \
    $(WBC_CFLAGS) \
    $(AM_CFLAGS)
ntlmssptest_LDADD = \
    $(WBC_LIBS) \
    $(GSSAPI_LIBS) \
    $(CRYPTO_LIBS)

dist_noinst_DATA += \
    m4

noinst_PROGRAMS = ntlmssptest

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

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

installgssntlmsspdirs::
	mkdir -p \
    $(DESTDIR)$(libdir)/gssntlmssp \
    $(DESTDIR)$(mandir)

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

install-exec-hook: installgssntlmsspdirs
	mkdir -p doc $(DESTDIR)/$(docdir); cp -a doc $(DESTDIR)/$(docdir)/

clean-local:
	rm -Rf doc

CLEANFILES = *.X */*.X */*/*.X

tests: all $(check_PROGRAMS)

# RPM-related tasks

RPMBUILD ?= $(PWD)/rpmbuild

dist_noinst_DATA += \
    m4 \
    contrib/gssntlmssp.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

po/$(PACKAGE).pot: $(POTFILES)
	@echo "Regenerating $@" ; rm -f $@ && \
	xgettext --directory=$(top_srcdir) --from-code=UTF-8 \
	  --sort-by-file --add-comments --keyword=_ --keyword=N_ \
	  --package-name="@PACKAGE@" --package-version="@VERSION@" \
	  --msgid-bugs-address="simo@samba.org" \
	  -o $@ $(POTFILES)

rpms: dist-gzip rpmroot
	cp $(builddir)/contrib/gssntlmssp.spec $(RPMBUILD)/SPECS
	cp $(distdir).tar.gz $(RPMBUILD)/SOURCES
	cd $(RPMBUILD); \
	rpmbuild --define "_topdir $(RPMBUILD)" -ba SPECS/gssntlmssp.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/gssntlmssp.spec $(RPMBUILD)/SPECS
	cp $(distdir).tar.gz $(RPMBUILD)/SOURCES
	cd $(RPMBUILD); \
	rpmbuild --define "_topdir $(RPMBUILD)" \
	         --define _source_filedigest_algorithm=1 \
	         -bs SPECS/gssntlmssp.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_gssntlmssp:
	TMPDIR=tests/scripts/ ./tests/scripts/dlopen.sh ./.libs/gssntlmssp.so || exit 1