/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: 2023-02-11 06:58:15 UTC
  • Revision ID: teddy@recompile.se-20230211065815-jtffi61tbdrgr875
Suppress warnings

Suppress warnings about mlock()ing uninitialized memory and reading an
ievent struct.

* dracut-module/password-agent.c (send_password_to_socket): Suppress
  "-Wmaybe-uninitialized" when mlock()ing password send buffer.
  (test_read_inotify_event_IN_DELETE_badname): When reading from
    a struct ievent, suppress "-Wstringop-overread".

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