/mandos/release

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

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: teddy at recompile
  • Date: 2011-12-31 13:25:58 UTC
  • mto: (237.7.89 trunk)
  • mto: This revision was merged to the branch mainline in revision 290.
  • Revision ID: teddy@recompile.se-20111231132558-z0dh7qgofgctmgri
* network-hooks.s/bridge: Don't use interface names directly; search
                          for interface names using their address.
  (addrtoif): New function.
* network-hooks.s/bridge.conf (PORTS): Removed.
  (PORT_ADDRESSES): New.
* network-hooks.s/wireless: Don't use interface names directly; search
                            for interface names using their address.
  (addrtoif): New function.
* network-hooks.s/wireless.conf: Specify address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
OPTIMIZE=-Os
24
24
LANGUAGE=-std=gnu99
25
25
htmldir=man
26
 
version=1.6.2
 
26
version=1.4.1
27
27
SED=sed
28
28
 
29
29
USER=$(firstword $(subst :, ,$(shell getent passwd _mandos || getent passwd nobody || echo 65534)))
47
47
STATEDIR=$(DESTDIR)/var/lib/mandos
48
48
##
49
49
 
50
 
SYSTEMD=$(DESTDIR)$(shell pkg-config systemd --variable=systemdsystemunitdir)
51
 
 
52
50
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
53
51
GNUTLS_LIBS=$(shell pkg-config --libs gnutls)
54
52
AVAHI_CFLAGS=$(shell pkg-config --cflags-only-I avahi-core)
58
56
        getconf LFS_LDFLAGS)
59
57
 
60
58
# Do not change these two
61
 
CFLAGS+=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
 
59
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
62
60
        $(LANGUAGE) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(GPGME_CFLAGS) \
63
61
        -DVERSION='"$(version)"'
64
 
LDFLAGS+=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
 
62
LDFLAGS=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
65
63
 
66
64
# Commands to format a DocBook <refentry> document into a manual page
67
65
DOCBOOKTOMAN=$(strip cd $(dir $<); xsltproc --nonet --xinclude \
70
68
        --param make.single.year.ranges         1 \
71
69
        --param man.output.quietly              1 \
72
70
        --param man.authors.section.enabled     0 \
73
 
        /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
 
71
         /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
74
72
        $(notdir $<); \
75
73
        $(MANPOST) $(notdir $@);\
76
 
        if locale --all 2>/dev/null | grep --regexp='^en_US\.utf8$$' \
77
 
        && type man 2>/dev/null; then LANG=en_US.UTF-8 MANWIDTH=80 \
78
 
        man --warnings --encoding=UTF-8 --local-file $(notdir $@); \
79
 
        fi >/dev/null)
 
74
        LANG=en_US.UTF-8 MANWIDTH=80 man --warnings --encoding=UTF-8 \
 
75
        --local-file $(notdir $@) >/dev/null)
80
76
# DocBook-to-man post-processing to fix a '\n' escape bug
81
77
MANPOST=$(SED) --in-place --expression='s,\\\\en,\\en,g;s,\\n,\\en,g'
82
78
 
243
239
 
244
240
check:  all
245
241
        ./mandos --check
246
 
        ./mandos-ctl --check
247
242
 
248
243
# Run the client with a local config and key
249
244
run-client: all keydir/seckey.txt keydir/pubkey.txt
269
264
        ./mandos-keygen --dir keydir --force
270
265
 
271
266
# Run the server with a local config
272
 
run-server: confdir/mandos.conf confdir/clients.conf statedir
 
267
run-server: confdir/mandos.conf confdir/clients.conf
273
268
        ./mandos --debug --no-dbus --configdir=confdir \
274
269
                --statedir=statedir $(SERVERARGS)
275
270
 
309
304
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
310
305
        install --mode=u=rwx,go=rx init.d-mandos \
311
306
                $(DESTDIR)/etc/init.d/mandos
312
 
        if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
313
 
                install --mode=u=rw,go=r mandos.service $(SYSTEMD) \
314
 
        fi
315
307
        install --mode=u=rw,go=r default-mandos \
316
308
                $(DESTDIR)/etc/default/mandos
317
309
        if [ -z $(DESTDIR) ]; then \
327
319
                > $(MANDIR)/man5/mandos.conf.5.gz
328
320
        gzip --best --to-stdout mandos-clients.conf.5 \
329
321
                > $(MANDIR)/man5/mandos-clients.conf.5.gz
330
 
        gzip --best --to-stdout intro.8mandos \
331
 
                > $(MANDIR)/man8/intro.8mandos.gz
332
322
 
333
323
install-client-nokey: all doc
334
324
        install --directory $(PREFIX)/lib/mandos $(CONFDIR)
441
431
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
442
432
                $(DESTDIR)/etc/default/mandos \
443
433
                $(DESTDIR)/etc/init.d/mandos \
444
 
                $(SYSTEMD)/mandos.service \
445
 
                $(DESTDIR)/run/mandos.pid \
446
434
                $(DESTDIR)/var/run/mandos.pid
447
435
        -rmdir $(CONFDIR)
448
436