/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.5
 
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) \
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
285
291
        install --mode=u=rw,go=r initramfs-tools-hook-conf \
286
292
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos
287
293
        install initramfs-tools-script \
288
 
                $(INITRAMFSTOOLS)/scripts/local-top/mandos
 
294
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos
289
295
        install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
290
296
        gzip --best --to-stdout mandos-keygen.8 \
291
297
                > $(MANDIR)/man8/mandos-keygen.8.gz
332
338
                $(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
333
339
                $(INITRAMFSTOOLS)/hooks/mandos \
334
340
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
335
 
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \
 
341
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos \
336
342
                $(MANDIR)/man8/plugin-runner.8mandos.gz \
337
343
                $(MANDIR)/man8/mandos-keygen.8.gz \
338
344
                $(MANDIR)/man8/password-prompt.8mandos.gz \