/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: Mooie
  • Date: 2009-01-10 00:53:09 UTC
  • mto: This revision was merged to the branch mainline in revision 258.
  • Revision ID: mooie@thinkmoo-20090110005309-1f1uhhvrif4tg6ev
Updated Makefile to use -fPIC.
Updated Makefile to use -pie and -fPIE correctly.

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=1 -Wextra -Wfloat-equal -Wundef -Wshadow \
 
3
        -Wstrict-aliasing=2 -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 \
16
16
OPTIMIZE=-Os
17
17
LANGUAGE=-std=gnu99
18
18
htmldir=man
19
 
version=1.0.8
 
19
version=1.0.3
20
20
SED=sed
21
21
 
22
22
## Use these settings for a traditional /usr/local install
39
39
GNUTLS_LIBS=$(shell libgnutls-config --libs)
40
40
AVAHI_CFLAGS=$(shell pkg-config --cflags-only-I avahi-core)
41
41
AVAHI_LIBS=$(shell pkg-config --libs avahi-core)
42
 
GPGME_CFLAGS=$(shell gpgme-config --cflags; getconf LFS_CFLAGS)
43
 
GPGME_LIBS=$(shell gpgme-config --libs; getconf LFS_LIBS; \
44
 
        getconf LFS_LDFLAGS)
 
42
GPGME_CFLAGS=$(shell gpgme-config --cflags)
 
43
GPGME_LIBS=$(shell gpgme-config --libs)
45
44
 
46
45
# Do not change these two
47
46
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
78
77
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
79
78
        plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo
80
79
CPROGS=plugin-runner $(PLUGINS)
81
 
PROGS=mandos mandos-keygen mandos-ctl $(CPROGS)
 
80
PROGS=mandos mandos-keygen mandos-list $(CPROGS)
82
81
DOCS=mandos.8 plugin-runner.8mandos mandos-keygen.8 \
83
82
        plugins.d/mandos-client.8mandos \
84
83
        plugins.d/password-prompt.8mandos mandos.conf.5 \
152
151
# Update all these files with version number $(version)
153
152
common.ent: Makefile
154
153
        $(SED) --in-place \
155
 
                --expression='s/^\(<!ENTITY version "\)[^"]*">$$/\1$(version)">/' \
 
154
                --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' \
156
155
                $@
157
156
 
158
157
mandos: Makefile
165
164
                --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' \
166
165
                $@
167
166
 
168
 
mandos-ctl: Makefile
 
167
mandos-list: Makefile
169
168
        $(SED) --in-place \
170
169
                --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
171
170
                $@
204
203
run-client: all keydir/seckey.txt keydir/pubkey.txt
205
204
        ./plugin-runner --plugin-dir=plugins.d \
206
205
                --config-file=plugin-runner.conf \
207
 
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
208
 
                $(CLIENTARGS)
 
206
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt
209
207
 
210
208
# Used by run-client
211
209
keydir/seckey.txt keydir/pubkey.txt: mandos-keygen
214
212
 
215
213
# Run the server with a local config
216
214
run-server: confdir/mandos.conf confdir/clients.conf
217
 
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
 
215
        ./mandos --debug --configdir=confdir
218
216
 
219
217
# Used by run-server
220
218
confdir/mandos.conf: mandos.conf
286
284
        install --mode=u=rw,go=r initramfs-tools-hook-conf \
287
285
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos
288
286
        install initramfs-tools-script \
289
 
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos
 
287
                $(INITRAMFSTOOLS)/scripts/local-top/mandos
290
288
        install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
291
289
        gzip --best --to-stdout mandos-keygen.8 \
292
290
                > $(MANDIR)/man8/mandos-keygen.8.gz
333
331
                $(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
334
332
                $(INITRAMFSTOOLS)/hooks/mandos \
335
333
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
336
 
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos \
 
334
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \
337
335
                $(MANDIR)/man8/plugin-runner.8mandos.gz \
338
336
                $(MANDIR)/man8/mandos-keygen.8.gz \
339
337
                $(MANDIR)/man8/password-prompt.8mandos.gz \