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