forked from SentryPeer/SentryPeer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
148 lines (136 loc) · 4.47 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only */
# Copyright (c) 2021 - 2022 Gavin Henry <[email protected]> */
#
# _____ _ _____
# / ____| | | | __ \
# | (___ ___ _ __ | |_ _ __ _ _| |__) |__ ___ _ __
# \___ \ / _ \ '_ \| __| '__| | | | ___/ _ \/ _ \ '__|
# ____) | __/ | | | |_| | | |_| | | | __/ __/ |
# |_____/ \___|_| |_|\__|_| \__, |_| \___|\___|_|
# __/ |
# |___/
#
bin_PROGRAMS=sentrypeer
sentrypeer_SOURCES= \
src/sentrypeer.c \
src/sentrypeer.h \
src/conf.c \
src/conf.h \
src/http_common.c \
src/http_common.h \
src/http_daemon.c \
src/http_daemon.h \
src/http_routes.c \
src/http_routes.h \
src/http_route_regex_check.c \
src/http_health_check_route.c \
src/http_ip_addresses_route.c \
src/http_ip_address_route.c \
src/http_called_numbers_route.c \
src/http_called_number_route.c \
src/sip_daemon.c \
src/sip_daemon.h \
src/sip_parser.c \
src/sip_parser.h \
src/utils.c \
src/utils.h \
src/bad_actor.c \
src/bad_actor.h \
src/database.c \
src/database.h
unit_test_sources = \
src/http_common.c \
src/http_common.h \
src/http_daemon.c \
src/http_daemon.h \
src/http_routes.c \
src/http_routes.h \
src/http_route_regex_check.c \
src/http_health_check_route.c \
src/http_ip_addresses_route.c \
src/http_ip_address_route.c \
src/http_called_numbers_route.c \
src/http_called_number_route.c \
src/sip_parser.c \
src/sip_parser.h \
src/bad_actor.c \
src/bad_actor.h \
src/conf.c \
src/conf.h \
src/utils.c \
src/utils.h \
src/database.c \
src/database.h \
tests/unit_tests/test_conf.c \
tests/unit_tests/test_conf.h \
tests/unit_tests/test_utils.c \
tests/unit_tests/test_utils.h \
tests/unit_tests/test_bad_actor.c \
tests/unit_tests/test_bad_actor.h \
tests/unit_tests/test_database.c \
tests/unit_tests/test_database.h \
tests/unit_tests/test_http_api.c \
tests/unit_tests/test_http_api.h \
tests/unit_tests/test_http_api_version.c \
tests/unit_tests/test_http_api_version.h \
tests/unit_tests/test_http_api.h \
tests/unit_tests/test_http_route_check.c \
tests/unit_tests/test_http_route_check.h \
tests/unit_tests/test_ip_address_regex.c \
tests/unit_tests/test_ip_address_regex.h \
tests/unit_tests/test_sip_message.c \
tests/unit_tests/test_sip_message.h \
tests/unit_tests/runner.c
EXTRA_DIST=AUTHORS README.md CHANGELOG.md \
COPYRIGHT COPYING LICENSE.GPL-2.0-only \
LICENSE.GPL-3.0-only CMakeLists.txt \
cmake/git_revision.cmake cmake/config.h.in
#########
# Clean
MAINTAINERCLEANFILES=configure aclocal.m4 compile \
install-sh missing Makefile.in depcomp \
stamp-h1 Makefile.in config.guess \
config.sub include/Makefile.in \
ltmain.sh depcomp libtool config.h.in \
config.h.in~ test-driver
maintainer-clean-local:
-rm -rf $(top_srcdir)/build
-rm -rf $(top_srcdir)/m4
-rm -rf $(top_srcdir)/autom4te.cache
.PHONY: bootstrap
bootstrap:
./bootstrap.sh
./configure
make clean
make check
make distcheck
# From http://mij.oltrelinux.com/devel/autoconf-automake/
# what flags you want to pass to the C compiler & linker
#
# https://github.com/mcinglis/c-style
#
# Also see Effective C, page 205 in the PDF (adding -fpie -Wl,-pie fails on Fedora 34 (Workstation Edition) )
# and some from https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc
AM_CFLAGS =-Wall -Werror -Wextra -Wpedantic -pedantic \
-Wformat=2 -Wno-unused-parameter -Wshadow \
-Wwrite-strings -Wstrict-prototypes -Wold-style-definition \
-Wredundant-decls -Wnested-externs -Wmissing-include-dirs \
-std=c18 -D_FORTIFY_SOURCE=2 -fpie -fpic -g3 -O2 \
-fstack-protector-strong -grecord-gcc-switches \
-Werror=format-security -Werror=implicit-function-declaration \
-Wmisleading-indentation $(LIBASAN_FLAGS)
AM_LDFLAGS=
ACLOCAL_AMFLAGS=-I m4
if HAVE_CMOCKA
TESTS=tests/unit_tests/runner
check_PROGRAMS = tests/unit_tests/runner
tests_unit_tests_runner_SOURCES = $(unit_test_sources)
tests_unit_tests_runner_CFLAGS = $(AM_CFLAGS)
tests_unit_tests_runner_LDADD = -lcmocka
endif
if HAVE_DOXYGEN
# Doxygen
docs:
doxygen
endif
dist_man_MANS=sentrypeer.1