/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 at recompile
  • Date: 2020-02-07 20:53:34 UTC
  • Revision ID: teddy@recompile.se-20200207205334-dp41p8c8vw0ytik5
Allow users to more easily alter mandos.service

The sysvinit script uses /etc/default/mandos as an environment file,
and supports adding additional server options to a DAEMON_ARGS
environment variable.  This should be supported by the systemd
service, too.

* mandos.service ([Service]/EnvironmentFile): New; set to
  "/etc/default/mandos ".
  ([Service]/ExecStart): Append "$DAEMON_ARGS".

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
# For info about _FORTIFY_SOURCE, see feature_test_macros(7)
31
31
# and <https://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>.
32
 
FORTIFY:=-fstack-protector-all -fPIC
33
 
CPPFLAGS+=-D_FORTIFY_SOURCE=3
 
32
FORTIFY:=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC
34
33
LINK_FORTIFY_LD:=-z relro -z now
35
34
LINK_FORTIFY:=
36
35
 
42
41
#COVERAGE=--coverage
43
42
OPTIMIZE:=-Os -fno-strict-aliasing
44
43
LANGUAGE:=-std=gnu11
45
 
CPPFLAGS+=-D_FILE_OFFSET_BITS=64
 
44
FEATURES:=-D_FILE_OFFSET_BITS=64
46
45
htmldir:=man
47
 
version:=1.8.16
 
46
version:=1.8.9
48
47
SED:=sed
49
48
PKG_CONFIG?=pkg-config
50
49
 
97
96
GNUTLS_LIBS:=$(shell $(PKG_CONFIG) --libs gnutls)
98
97
AVAHI_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I avahi-core)
99
98
AVAHI_LIBS:=$(shell $(PKG_CONFIG) --libs avahi-core)
100
 
GPGME_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I gpgme 2>/dev/null \
101
 
        || gpgme-config --cflags; getconf LFS_CFLAGS)
102
 
GPGME_LIBS:=$(shell $(PKG_CONFIG) --libs gpgme 2>/dev/null \
103
 
        || gpgme-config --libs; getconf LFS_LIBS; \
 
99
GPGME_CFLAGS:=$(shell gpgme-config --cflags; getconf LFS_CFLAGS)
 
100
GPGME_LIBS:=$(shell gpgme-config --libs; getconf LFS_LIBS; \
104
101
        getconf LFS_LDFLAGS)
105
102
LIBNL3_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I libnl-route-3.0)
106
103
LIBNL3_LIBS:=$(shell $(PKG_CONFIG) --libs libnl-route-3.0)
109
106
 
110
107
# Do not change these two
111
108
CFLAGS+=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
112
 
        $(LANGUAGE) -DVERSION='"$(version)"'
 
109
        $(LANGUAGE) $(FEATURES) -DVERSION='"$(version)"'
113
110
LDFLAGS+=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(strip \
114
111
        ) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
115
112
 
299
296
 
300
297
# Need to add the GLib and pthread libraries
301
298
dracut-module/password-agent: CFLAGS += $(GLIB_CFLAGS)
302
 
# Note: -lpthread is unnecessary with the GNU C library 2.34 or later
303
299
dracut-module/password-agent: LDLIBS += $(GLIB_LIBS) -lpthread
304
300
 
305
301
.PHONY: clean
358
354
keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem: mandos-keygen
359
355
        install --directory keydir
360
356
        ./mandos-keygen --dir keydir --force
361
 
        if ! [ -e keydir/tls-privkey.pem ]; then \
362
 
                install --mode=u=rw /dev/null keydir/tls-privkey.pem; \
363
 
        fi
364
 
        if ! [ -e keydir/tls-pubkey.pem ]; then \
365
 
                install --mode=u=rw /dev/null keydir/tls-pubkey.pem; \
366
 
        fi
367
357
 
368
358
# Run the server with a local config
369
359
.PHONY: run-server