/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-28 18:00:20 UTC
  • Revision ID: teddy@fukt.bsnet.se-20081028180020-qsiaedlurboi3nm4
* INSTALL: Fixed typo.

* Makefile: Split long lines.
  (install-html): Depend on "html", not "$(htmldocs)".

* README (Copyright): Modified legalese.

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 \
69
70
        /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
70
71
        $<; $(HTMLPOST) $@
71
72
# Fix citerefentry links
72
 
HTMLPOST=$(SED) --in-place --expression='s/\(<a class="citerefentry" href="\)\("><span class="citerefentry"><span class="refentrytitle">\)\([^<]*\)\(<\/span>(\)\([^)]*\)\()<\/span><\/a>\)/\1\3.\5\2\3\4\5\6/g'
 
73
HTMLPOST=$(SED) --in-place \
 
74
        --expression='s/\(<a class="citerefentry" href="\)\("><span class="citerefentry"><span class="refentrytitle">\)\([^<]*\)\(<\/span>(\)\([^)]*\)\()<\/span><\/a>\)/\1\3.\5\2\3\4\5\6/g'
73
75
 
74
76
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
75
77
        plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo
85
87
 
86
88
objects=$(addsuffix .o,$(CPROGS))
87
89
 
88
 
all: $(PROGS)
 
90
all: $(PROGS) mandos.lsm
89
91
 
90
92
doc: $(DOCS)
91
93
 
147
149
 
148
150
# Update all these files with version number $(version)
149
151
common.ent: Makefile
150
 
        $(SED) --in-place --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' $@
 
152
        $(SED) --in-place \
 
153
                --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' \
 
154
                $@
151
155
 
152
156
mandos: Makefile
153
 
        $(SED) --in-place --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' $@
 
157
        $(SED) --in-place \
 
158
                --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
 
159
                $@
154
160
 
155
161
mandos-keygen: Makefile
156
 
        $(SED) --in-place --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' $@
 
162
        $(SED) --in-place \
 
163
                --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' \
 
164
                $@
 
165
 
 
166
mandos.lsm: Makefile
 
167
        $(SED) --in-place \
 
168
                --expression='s/^\(Version:\).*/\1\t$(version)/' \
 
169
                $@
 
170
        $(SED) --in-place \
 
171
                --expression='s/^\(Entered-date:\).*/\1\t$(shell date --rfc-3339=date --reference=Makefile)/' \
 
172
                $@
157
173
 
158
174
plugins.d/mandos-client: plugins.d/mandos-client.o
159
175
        $(LINK.o) $(GNUTLS_LIBS) $(AVAHI_LIBS) $(GPGME_LIBS) \
201
217
 
202
218
install: install-server install-client-nokey
203
219
 
204
 
install-html: $(htmldocs)
 
220
install-html: html
205
221
        install --directory $(htmldir)
206
222
        install --mode=u=rw,go=r --target-directory=$(htmldir) \
207
223
                $(htmldocs)