]> git.proxmox.com Git - mirror_frr.git/blob - Makefile.am
Merge pull request #2985 from patrasar/Fix_1636
[mirror_frr.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 AUTOMAKE_OPTIONS = subdir-objects 1.12
4 ACLOCAL_AMFLAGS = -I m4
5
6 AM_CFLAGS = \
7 $(SAN_FLAGS) \
8 $(WERROR) \
9 # end
10 AM_CPPFLAGS = \
11 -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \
12 -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib
13 AM_LDFLAGS = \
14 -export-dynamic \
15 $(SAN_FLAGS) \
16 # end
17 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE)
18 LIBCAP = @LIBCAP@
19
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-%
28 VARFD ?= 1
29 shvar-%:
30 @echo "$*=\"$($*)\"" >&$(VARFD)
31 var-%:
32 @echo "$($*)" >&$(VARFD)
33
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
76 EXTRA_DIST =
77 BUILT_SOURCES =
78 CLEANFILES =
79
80 examplesdir = $(exampledir)
81
82 bin_PROGRAMS =
83 sbin_PROGRAMS =
84 sbin_SCRIPTS =
85 noinst_PROGRAMS =
86 noinst_HEADERS =
87 noinst_LIBRARIES =
88 nodist_noinst_DATA =
89 lib_LTLIBRARIES =
90 module_LTLIBRARIES =
91 pkginclude_HEADERS =
92 nodist_pkginclude_HEADERS =
93 dist_examples_DATA =
94 man_MANS =
95 vtysh_scan =
96
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
105 include doc/subdir.am
106 include doc/user/subdir.am
107 include doc/manpages/subdir.am
108 include doc/developer/subdir.am
109 include include/subdir.am
110 include lib/subdir.am
111 include zebra/subdir.am
112 include watchfrr/subdir.am
113 include qpb/subdir.am
114 include fpm/subdir.am
115 include tools/subdir.am
116 include debianpkg/subdir.am
117 include solaris/subdir.am
118
119 include bgpd/subdir.am
120 include bgpd/rfp-example/librfp/subdir.am
121 include bgpd/rfp-example/rfptest/subdir.am
122 include ripd/subdir.am
123 include ripngd/subdir.am
124 include ospfd/subdir.am
125 include ospf6d/subdir.am
126 include ospfclient/subdir.am
127 include isisd/subdir.am
128 include nhrpd/subdir.am
129 include ldpd/subdir.am
130 include babeld/subdir.am
131 include eigrpd/subdir.am
132 include sharpd/subdir.am
133 include pimd/subdir.am
134 include pbrd/subdir.am
135 include staticd/subdir.am
136 include bfdd/subdir.am
137
138 include vtysh/subdir.am
139 include tests/subdir.am
140
141 if PKGSRC
142 rcdir=@pkgsrcrcdir@
143 rc_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
151 endif
152
153 EXTRA_DIST += \
154 aclocal.m4 \
155 README.md \
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 \
178 babeld/Makefile \
179 bgpd/Makefile \
180 bgpd/rfp-example/librfp/Makefile \
181 bgpd/rfp-example/rfptest/Makefile \
182 doc/Makefile \
183 doc/developer/Makefile \
184 doc/manpages/Makefile \
185 doc/user/Makefile \
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 \
207 # end
208
209 noinst_HEADERS += defaults.h
210
211 indent:
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`
213
214 if HAVE_GCOV
215
216 coverage: check
217 @ find . -name '*.o' -exec gcov {} \;
218
219 yorn:
220 @ echo "OK to upload coverage to https://coverage.io [y/N]:"
221 @ read yn; test "$$yn" = "y"
222
223 upload-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
228 force-check-coverage: coverage upload-check-coverage
229
230 check-coverage: coverage yorn upload-check-coverage
231
232 endif