]> git.proxmox.com Git - mirror_frr.git/blame - Makefile.am
Merge pull request #3061 from pacovn/static_analysis__Wgnu-redeclared-enum
[mirror_frr.git] / Makefile.am
CommitLineData
718e3744 1## Process this file with automake to produce Makefile.in.
2
4a121f99 3AUTOMAKE_OPTIONS = subdir-objects 1.12
aad24c5b 4ACLOCAL_AMFLAGS = -I m4
4a121f99 5
aad24c5b 6AM_CFLAGS = \
dbac691d
DL
7 $(SAN_FLAGS) \
8 $(WERROR) \
9 # end
aad24c5b 10AM_CPPFLAGS = \
aad24c5b
DL
11 -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \
12 -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib
4007e3ad 13AM_LDFLAGS = \
dbac691d
DL
14 -export-dynamic \
15 $(SAN_FLAGS) \
16 # end
62d21cc6 17DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE)
64d44794 18LIBCAP = @LIBCAP@
4a121f99 19
b8dd5f9d
DL
20# these two targets are provided to easily grab autoconf/Makefile variables
21# you can use either:
22# eval `make VARFD=3 shvar-CFLAGS 3>&1 1>&2`
23# CFLAGS="`make VARFD=3 var-CFLAGS 3>&1 1>&2`"
24# where the former can be used to set several variables at once. Note the
25# fd redirections -- this is to prevent garbage from make rebuilding other
26# targets from causing issues.
27.PHONY: shvar-% var-%
28VARFD ?= 1
29shvar-%:
30 @echo "$*=\"$($*)\"" >&$(VARFD)
31var-%:
32 @echo "$($*)" >&$(VARFD)
33
892d21b1
DL
34# overwriting these vars breaks cross-compilation. let's be helpful and warn.
35#
36# note: "#AUTODERP# " will be removed from Makefile by configure. These are
37# GNU make directives & automake will f*ck them up by trying to process them
38# as automake directives.
39#
40#AUTODERP# null=
41#AUTODERP# SPACE=$(null) $(null)
42#AUTODERP# mkcheck_CC = $(findstring $(SPACE)CC=, $(SPACE)$(MAKEOVERRIDES))
43#AUTODERP# mkcheck_CFLAGS = $(findstring $(SPACE)CFLAGS=, $(SPACE)$(MAKEOVERRIDES))
44#AUTODERP# mkcheck_CPPFLAGS = $(findstring $(SPACE)CPPFLAGS=,$(SPACE)$(MAKEOVERRIDES))
45#AUTODERP# mkcheck_CCLD = $(findstring $(SPACE)CCLD=, $(SPACE)$(MAKEOVERRIDES))
46#AUTODERP# mkcheck_LD = $(findstring $(SPACE)LD=, $(SPACE)$(MAKEOVERRIDES))
47#AUTODERP# mkcheck_LDFLAGS = $(findstring $(SPACE)LDFLAGS=, $(SPACE)$(MAKEOVERRIDES))
48#AUTODERP# #
49#AUTODERP# ifneq ($(mkcheck_CC),)
50#AUTODERP# $(warning WARNING: you have overwritten the "CC" variable on the make command line.)
51#AUTODERP# endif
52#AUTODERP# ifneq ($(mkcheck_CFLAGS),)
53#AUTODERP# $(warning WARNING: you have overwritten the "CFLAGS" variable on the make command line.)
54#AUTODERP# endif
55#AUTODERP# ifneq ($(mkcheck_CPPFLAGS),)
56#AUTODERP# $(warning WARNING: you have overwritten the "CPPFLAGS" variable on the make command line.)
57#AUTODERP# endif
58#AUTODERP# ifneq ($(mkcheck_CCLD),)
59#AUTODERP# $(warning WARNING: you have overwritten the "CCLD" variable on the make command line.)
60#AUTODERP# endif
61#AUTODERP# ifneq ($(mkcheck_LD),)
62#AUTODERP# $(warning WARNING: you have overwritten the "LD" variable on the make command line.)
63#AUTODERP# endif
64#AUTODERP# ifneq ($(mkcheck_LDFLAGS),)
65#AUTODERP# $(warning WARNING: you have overwritten the "LDFLAGS" variable on the make command line.)
66#AUTODERP# endif
67#AUTODERP# #
68#AUTODERP# ifneq ($(mkcheck_CC)$(mkcheck_CFLAGS)$(mkcheck_CPPFLAGS)$(mkcheck_CCLD)$(mkcheck_LD)$(mkcheck_LDFLAGS),)
69#AUTODERP# $(warning ------)
70#AUTODERP# $(warning While overwriting these variables works most of the time, it is not recommended and can cause confusing build errors.)
71#AUTODERP# $(warning This is especially problematic when cross-compiling, since tools that run on the build system during the build process will not be compiled correctly.)
72#AUTODERP# $(warning All of these variables should be supplied to 'configure', and they will be remembered and correctly applied during 'make'.)
73#AUTODERP# $(warning ------)
74#AUTODERP# endif
75
4a121f99
DL
76EXTRA_DIST =
77BUILT_SOURCES =
0f8b5fd5 78CLEANFILES =
4a121f99 79
64d44794
DL
80examplesdir = $(exampledir)
81
4a121f99
DL
82bin_PROGRAMS =
83sbin_PROGRAMS =
bd354725 84sbin_SCRIPTS =
4a121f99
DL
85noinst_PROGRAMS =
86noinst_HEADERS =
87noinst_LIBRARIES =
9e53b315 88nodist_noinst_DATA =
4a121f99 89lib_LTLIBRARIES =
64d44794 90module_LTLIBRARIES =
4a121f99 91pkginclude_HEADERS =
70d27c5b 92nodist_pkginclude_HEADERS =
64d44794 93dist_examples_DATA =
9e53b315 94man_MANS =
74dc19a2 95vtysh_scan =
4a121f99 96
6a35bfba
DL
97## libtool, the self-made GNU scourge
98## ... this should fix relinking
99## ... and AUTOMAKE_DUMMY is needed to prevent automake from treating this
100## as overriding the normal targets...
101$(AUTOMAKE_DUMMY)install-moduleLTLIBRARIES: install-libLTLIBRARIES
102$(AUTOMAKE_DUMMY)install-binPROGRAMS: install-libLTLIBRARIES
103$(AUTOMAKE_DUMMY)install-sbinPROGRAMS: install-libLTLIBRARIES
104
9e53b315
DL
105include doc/subdir.am
106include doc/user/subdir.am
107include doc/manpages/subdir.am
108include doc/developer/subdir.am
ba777396 109include include/subdir.am
4a121f99 110include lib/subdir.am
64d44794 111include zebra/subdir.am
bd354725 112include watchfrr/subdir.am
0f8b5fd5
DL
113include qpb/subdir.am
114include fpm/subdir.am
bd354725 115include tools/subdir.am
0d0812a4 116include debianpkg/subdir.am
e3863245 117include solaris/subdir.am
4a121f99 118
84d837b7
DL
119include bgpd/subdir.am
120include bgpd/rfp-example/librfp/subdir.am
121include bgpd/rfp-example/rfptest/subdir.am
7f269117
DL
122include ripd/subdir.am
123include ripngd/subdir.am
afca0690
DL
124include ospfd/subdir.am
125include ospf6d/subdir.am
126include ospfclient/subdir.am
86e463cf 127include isisd/subdir.am
cde8cd9d 128include nhrpd/subdir.am
30237d29 129include ldpd/subdir.am
b6f5781c
DL
130include babeld/subdir.am
131include eigrpd/subdir.am
8a71d93d 132include sharpd/subdir.am
35a3c3c1 133include pimd/subdir.am
e5c83d9b 134include pbrd/subdir.am
7e24fdf3 135include staticd/subdir.am
7134904b 136include bfdd/subdir.am
7f269117 137
8b7668ec 138include vtysh/subdir.am
a1286a32 139include tests/subdir.am
718e3744 140
53d93be1
DL
141if PKGSRC
142rcdir=@pkgsrcrcdir@
143rc_SCRIPTS = \
144 pkgsrc/bgpd.sh \
145 pkgsrc/ospf6d.sh \
146 pkgsrc/ospfd.sh \
147 pkgsrc/ripd.sh \
148 pkgsrc/ripngd.sh \
149 pkgsrc/zebra.sh \
150 # end
151endif
152
153EXTRA_DIST += \
53d93be1 154 aclocal.m4 \
d85cb6b6 155 README.md \
53d93be1
DL
156 m4/README.txt \
157 \
158 python/clidef.py \
159 python/clippy/__init__.py \
160 \
161 redhat/frr.init \
162 redhat/frr.service \
163 redhat/daemons \
164 redhat/frr.logrotate \
165 redhat/frr.pam \
166 redhat/frr.spec \
167 redhat/README.rpm_build.md \
168 \
169 snapcraft/snapcraft.yaml \
170 snapcraft/README.snap_build.md \
171 snapcraft/README.usage.md \
172 snapcraft/extra_version_info.txt \
173 snapcraft/scripts \
174 snapcraft/defaults \
175 snapcraft/helpers \
176 snapcraft/snap \
177 \
f8948c1e
DL
178 babeld/Makefile \
179 bgpd/Makefile \
180 bgpd/rfp-example/librfp/Makefile \
181 bgpd/rfp-example/rfptest/Makefile \
9e53b315
DL
182 doc/Makefile \
183 doc/developer/Makefile \
184 doc/manpages/Makefile \
185 doc/user/Makefile \
f8948c1e
DL
186 eigrpd/Makefile \
187 fpm/Makefile \
188 isisd/Makefile \
189 ldpd/Makefile \
190 lib/Makefile \
191 nhrpd/Makefile \
192 ospf6d/Makefile \
193 ospfclient/Makefile \
194 ospfd/Makefile \
195 pbrd/Makefile \
196 pimd/Makefile \
197 ports/Makefile \
198 qpb/Makefile \
199 ripd/Makefile \
200 ripngd/Makefile \
201 staticd/Makefile \
202 tests/Makefile \
203 tools/Makefile \
204 vtysh/Makefile \
205 watchfrr/Makefile \
206 zebra/Makefile \
53d93be1 207 # end
0fc42949 208
4a121f99 209noinst_HEADERS += defaults.h
da5a0d00
LB
210
211indent:
212 tools/indent.py `find sharpd bgpd eigrpd include isisd lib nhrpd ospf6d ospfd pimd qpb ripd vtysh zebra -name '*.[ch]' | grep -v include/linux`
83284209
AJ
213
214if HAVE_GCOV
215
216coverage: check
217 @ find . -name '*.o' -exec gcov {} \;
218
219yorn:
220 @ echo "OK to upload coverage to https://coverage.io [y/N]:"
221 @ read yn; test "$$yn" = "y"
222
223upload-check-coverage:
224 @ if [ "x${COMMIT}" = "x" ]; then echo "COMMIT required"; exit 1; fi
225 @ if [ "x${TOKEN}" = "x" ]; then echo "TOKEN required"; exit 1; fi
226 curl -s https://codecov.io/bash | bash -s - -C ${COMMIT} -t ${TOKEN}
227
228force-check-coverage: coverage upload-check-coverage
229
230check-coverage: coverage yorn upload-check-coverage
231
232endif