/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to Makefile

* Makefile: Don't use PIE if BROKEN_PIE is set.
* debian/rules: Set BROKEN_PIE on mips and mipsel architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
WARN=-O -Wall -Wformat=2 -Winit-self -Wmissing-include-dirs \
2
2
        -Wswitch-default -Wswitch-enum -Wunused-parameter \
3
 
        -Wstrict-aliasing=2 -Wextra -Wfloat-equal -Wundef -Wshadow \
 
3
        -Wstrict-aliasing=1 -Wextra -Wfloat-equal -Wundef -Wshadow \
4
4
        -Wunsafe-loop-optimizations -Wpointer-arith \
5
5
        -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings \
6
6
        -Wconversion -Wstrict-prototypes -Wold-style-definition \
9
9
#DEBUG=-ggdb3
10
10
# For info about _FORTIFY_SOURCE, see
11
11
# <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>
12
 
FORTIFY=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC -fPIE
13
 
LINK_FORTIFY_LD=-z relro -fPIE
14
 
LINK_FORTIFY=-pie
 
12
FORTIFY=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC
 
13
LINK_FORTIFY_LD=-z relro -z now
 
14
LINK_FORTIFY=
 
15
ifndef BROKEN_PIE
 
16
FORTIFY += -fPIE
 
17
LINK_FORTIFY_LD += -fPIE
 
18
LINK_FORTIFY += -pie
 
19
endif
15
20
#COVERAGE=--coverage
16
21
OPTIMIZE=-Os
17
22
LANGUAGE=-std=gnu99
18
23
htmldir=man
19
 
version=1.0.3
 
24
version=1.0.13
20
25
SED=sed
21
26
 
22
27
## Use these settings for a traditional /usr/local install
35
40
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
36
41
##
37
42
 
38
 
GNUTLS_CFLAGS=$(shell libgnutls-config --cflags)
39
 
GNUTLS_LIBS=$(shell libgnutls-config --libs)
 
43
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
 
44
GNUTLS_LIBS=$(shell pkg-config --libs gnutls)
40
45
AVAHI_CFLAGS=$(shell pkg-config --cflags-only-I avahi-core)
41
46
AVAHI_LIBS=$(shell pkg-config --libs avahi-core)
42
 
GPGME_CFLAGS=$(shell gpgme-config --cflags)
43
 
GPGME_LIBS=$(shell gpgme-config --libs)
 
47
GPGME_CFLAGS=$(shell gpgme-config --cflags; getconf LFS_CFLAGS)
 
48
GPGME_LIBS=$(shell gpgme-config --libs; getconf LFS_LIBS; \
 
49
        getconf LFS_LDFLAGS)
44
50
 
45
51
# Do not change these two
46
52
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
77
83
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
78
84
        plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo
79
85
CPROGS=plugin-runner $(PLUGINS)
80
 
PROGS=mandos mandos-keygen $(CPROGS)
 
86
PROGS=mandos mandos-keygen mandos-ctl $(CPROGS)
81
87
DOCS=mandos.8 plugin-runner.8mandos mandos-keygen.8 \
82
88
        plugins.d/mandos-client.8mandos \
83
89
        plugins.d/password-prompt.8mandos mandos.conf.5 \
151
157
# Update all these files with version number $(version)
152
158
common.ent: Makefile
153
159
        $(SED) --in-place \
154
 
                --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' \
 
160
                --expression='s/^\(<!ENTITY version "\)[^"]*">$$/\1$(version)">/' \
155
161
                $@
156
162
 
157
163
mandos: Makefile
164
170
                --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' \
165
171
                $@
166
172
 
 
173
mandos-ctl: Makefile
 
174
        $(SED) --in-place \
 
175
                --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
 
176
                $@
 
177
 
167
178
mandos.lsm: Makefile
168
179
        $(SED) --in-place \
169
180
                --expression='s/^\(Version:\).*/\1\t$(version)/' \
208
219
 
209
220
# Run the server with a local config
210
221
run-server: confdir/mandos.conf confdir/clients.conf
211
 
        ./mandos --debug --configdir=confdir $(SERVERARGS)
 
222
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
212
223
 
213
224
# Used by run-server
214
225
confdir/mandos.conf: mandos.conf
280
291
        install --mode=u=rw,go=r initramfs-tools-hook-conf \
281
292
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos
282
293
        install initramfs-tools-script \
283
 
                $(INITRAMFSTOOLS)/scripts/local-top/mandos
 
294
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos
284
295
        install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
285
296
        gzip --best --to-stdout mandos-keygen.8 \
286
297
                > $(MANDIR)/man8/mandos-keygen.8.gz
327
338
                $(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
328
339
                $(INITRAMFSTOOLS)/hooks/mandos \
329
340
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
330
 
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \
 
341
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos \
331
342
                $(MANDIR)/man8/plugin-runner.8mandos.gz \
332
343
                $(MANDIR)/man8/mandos-keygen.8.gz \
333
344
                $(MANDIR)/man8/password-prompt.8mandos.gz \