/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

  • Committer: Teddy Hogeborn
  • Date: 2008-10-18 11:17:22 UTC
  • Revision ID: teddy@fukt.bsnet.se-20081018111722-jtbz35c031lxuuc9
* debian/mandos-client.docs (NEWS): Added.
* debian/mandos.docs (NEWS): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
12
FORTIFY=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -pie
 
13
LINK_FORTIFY=-z relro -pie
13
14
#COVERAGE=--coverage
14
15
OPTIMIZE=-Os
15
16
LANGUAGE=-std=gnu99
16
17
htmldir=man
17
 
version=1.0
 
18
version=1.0.2
18
19
SED=sed
19
20
 
20
21
## Use these settings for a traditional /usr/local install
44
45
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
45
46
        $(LANGUAGE) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(GPGME_CFLAGS) \
46
47
        -DVERSION='"$(version)"'
47
 
LDFLAGS=$(COVERAGE)
 
48
LDFLAGS=$(COVERAGE) $(LINK_FORTIFY)
48
49
 
49
50
# Commands to format a DocBook <refentry> document into a manual page
50
51
DOCBOOKTOMAN=cd $(dir $<); xsltproc --nonet --xinclude \
78
79
DOCS=mandos.8 plugin-runner.8mandos mandos-keygen.8 \
79
80
        plugins.d/mandos-client.8mandos \
80
81
        plugins.d/password-prompt.8mandos mandos.conf.5 \
81
 
        mandos-clients.conf.5
 
82
        plugins.d/usplash.8mandos plugins.d/splashy.8mandos \
 
83
        plugins.d/askpass-fifo.8mandos mandos-clients.conf.5
82
84
 
83
85
htmldocs=$(addsuffix .xhtml,$(DOCS))
84
86
 
85
87
objects=$(addsuffix .o,$(CPROGS))
86
88
 
87
 
all: $(PROGS)
 
89
all: $(PROGS) mandos.lsm
88
90
 
89
91
doc: $(DOCS)
90
92
 
149
151
        $(SED) --in-place --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' $@
150
152
 
151
153
mandos: Makefile
152
 
        $(SED) --in-place --expression='s/^\(version = "\)[^"]*"/\1$(version)"/' $@
 
154
        $(SED) --in-place --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' $@
153
155
 
154
156
mandos-keygen: Makefile
155
 
        $(SED) --in-place --expression='s/^\(VERSION="\)[^"]*"/\1$(version)"/' $@
 
157
        $(SED) --in-place --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' $@
 
158
 
 
159
mandos.lsm: Makefile
 
160
        $(SED) --in-place --expression='s/^\(Version:\).*/\1\t$(version)/' $@
 
161
        $(SED) --in-place --expression='s/^\(Entered-date:\).*/\1\t$(shell date --rfc-3339=date --reference=Makefile)/' $@
156
162
 
157
163
plugins.d/mandos-client: plugins.d/mandos-client.o
158
164
        $(LINK.o) $(GNUTLS_LIBS) $(AVAHI_LIBS) $(GPGME_LIBS) \
268
274
                > $(MANDIR)/man8/password-prompt.8mandos.gz
269
275
        gzip --best --to-stdout plugins.d/mandos-client.8mandos \
270
276
                > $(MANDIR)/man8/mandos-client.8mandos.gz
 
277
        gzip --best --to-stdout plugins.d/usplash.8mandos \
 
278
                > $(MANDIR)/man8/usplash.8mandos.gz
 
279
        gzip --best --to-stdout plugins.d/splashy.8mandos \
 
280
                > $(MANDIR)/man8/splashy.8mandos.gz
 
281
        gzip --best --to-stdout plugins.d/askpass-fifo.8mandos \
 
282
                > $(MANDIR)/man8/askpass-fifo.8mandos.gz
271
283
 
272
284
install-client: install-client-nokey
273
285
# Post-installation stuff
296
308
                $(PREFIX)/lib/mandos/plugins.d/mandos-client \
297
309
                $(PREFIX)/lib/mandos/plugins.d/usplash \
298
310
                $(PREFIX)/lib/mandos/plugins.d/splashy \
 
311
                $(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
299
312
                $(INITRAMFSTOOLS)/hooks/mandos \
300
313
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
301
314
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \
302
315
                $(MANDIR)/man8/plugin-runner.8mandos.gz \
303
316
                $(MANDIR)/man8/mandos-keygen.8.gz \
304
317
                $(MANDIR)/man8/password-prompt.8mandos.gz \
 
318
                $(MANDIR)/man8/usplash.8mandos.gz \
 
319
                $(MANDIR)/man8/splashy.8mandos.gz \
 
320
                $(MANDIR)/man8/askpass-fifo.8mandos.gz \
305
321
                $(MANDIR)/man8/mandos-client.8mandos.gz
306
 
        if [ "$(CONFDIR)" != "$(PREFIX)/lib/mandos" ]; then \
307
 
                rm --force $(CONFDIR)/plugins.d/README; \
308
 
        fi
309
322
        -rmdir $(PREFIX)/lib/mandos/plugins.d $(CONFDIR)/plugins.d \
310
323
                 $(PREFIX)/lib/mandos $(CONFDIR) $(KEYDIR)
311
324
        update-initramfs -k all -u