]> git.proxmox.com Git - mirror_frr.git/blame - lib/subdir.am
Merge pull request #8890 from rameshabhinay/ospf6_auth_trailer
[mirror_frr.git] / lib / subdir.am
CommitLineData
4a121f99
DL
1#
2# libfrr
3#
4lib_LTLIBRARIES += lib/libfrr.la
63116a70 5lib_libfrr_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0 -Xlinker -e_libfrr_version
3bd7df45 6lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS) $(LUA_LIB) $(UST_LIBS) $(LIBCRYPT) $(LIBDL) $(LIBM)
4a121f99
DL
7
8lib_libfrr_la_SOURCES = \
8e1f6512 9 lib/agg_table.c \
bcea0c0f 10 lib/atomlist.c \
4a121f99
DL
11 lib/bfd.c \
12 lib/buffer.c \
13 lib/checksum.c \
14 lib/command.c \
15 lib/command_graph.c \
16 lib/command_lex.l \
17 lib/command_match.c \
18 lib/command_parse.y \
fd8e262a 19 lib/cspf.c \
4a121f99 20 lib/csv.c \
aea03ad6 21 lib/debug.c \
96673e06 22 lib/defaults.c \
4a121f99 23 lib/distribute.c \
3155489a 24 lib/ferr.c \
4a121f99 25 lib/filter.c \
b62578bd 26 lib/filter_cli.c \
c2aab693 27 lib/filter_nb.c \
3e41733f 28 lib/frrcu.c \
5dbb0a7b 29 lib/frrlua.c \
5f98c815 30 lib/frrscript.c \
4a121f99 31 lib/frr_pthread.c \
fe011935 32 lib/frrstr.c \
4a121f99
DL
33 lib/getopt.c \
34 lib/getopt1.c \
35 lib/grammar_sandbox.c \
36 lib/graph.c \
37 lib/hash.c \
38 lib/hook.c \
a94eca09 39 lib/id_alloc.c \
4a121f99
DL
40 lib/if.c \
41 lib/if_rmap.c \
42 lib/imsg-buffer.c \
43 lib/imsg.c \
44 lib/jhash.c \
45 lib/json.c \
46 lib/keychain.c \
24e7c5c8 47 lib/ldp_sync.c \
b66d022e 48 lib/lib_errors.c \
1c0d8808 49 lib/lib_vty.c \
4a121f99 50 lib/libfrr.c \
912d45a1 51 lib/libfrr_trace.c \
4a121f99 52 lib/linklist.c \
bbd85e20 53 lib/link_state.c \
4a121f99 54 lib/log.c \
1c408628 55 lib/log_filter.c \
f73126c3 56 lib/log_vty.c \
4a121f99
DL
57 lib/md5.c \
58 lib/memory.c \
6edbb8b2 59 lib/mlag.c \
4a121f99 60 lib/module.c \
036fdaad 61 lib/mpls.c \
e496b420 62 lib/srv6.c \
4a121f99
DL
63 lib/network.c \
64 lib/nexthop.c \
e26aedbe
PG
65 lib/netns_linux.c \
66 lib/netns_other.c \
7ee30f28 67 lib/nexthop_group.c \
1c2facd1
RW
68 lib/northbound.c \
69 lib/northbound_cli.c \
70 lib/northbound_db.c \
e128c002 71 lib/ntop.c \
4a121f99
DL
72 lib/openbsd-tree.c \
73 lib/pid_output.c \
74 lib/plist.c \
4a121f99
DL
75 lib/prefix.c \
76 lib/privs.c \
77 lib/ptm_lib.c \
5c52c06c 78 lib/pullwr.c \
4a121f99 79 lib/qobj.c \
5318d896 80 lib/ringbuf.c \
4a121f99 81 lib/routemap.c \
2b3e4807 82 lib/routemap_cli.c \
686d244f 83 lib/routemap_northbound.c \
31bfa062 84 lib/sbuf.c \
440d5faa 85 lib/seqlock.c \
4a121f99
DL
86 lib/sha256.c \
87 lib/sigevent.c \
88 lib/skiplist.c \
89 lib/sockopt.c \
90 lib/sockunion.c \
91 lib/spf_backoff.c \
92 lib/srcdest_table.c \
93 lib/stream.c \
a4cb97a6 94 lib/strformat.c \
4a121f99
DL
95 lib/strlcat.c \
96 lib/strlcpy.c \
97 lib/systemd.c \
98 lib/table.c \
99 lib/termtable.c \
100 lib/thread.c \
80911bc2 101 lib/typerb.c \
abd71baa 102 lib/typesafe.c \
4a121f99
DL
103 lib/vector.c \
104 lib/vrf.c \
105 lib/vty.c \
106 lib/wheel.c \
107 lib/workqueue.c \
8e427c29 108 lib/xref.c \
1c2facd1
RW
109 lib/yang.c \
110 lib/yang_translator.c \
111 lib/yang_wrappers.c \
4a121f99 112 lib/zclient.c \
0bdeb5e5 113 lib/zlog.c \
1c6261a9
DL
114 lib/zlog_5424.c \
115 lib/zlog_5424_cli.c \
0bdeb5e5 116 lib/zlog_targets.c \
5c25bd87
DL
117 lib/printf/printf-pos.c \
118 lib/printf/vfprintf.c \
119 lib/printf/glue.c \
7441ea1a 120 lib/routing_nb.c \
121 lib/routing_nb_config.c \
4a121f99
DL
122 # end
123
3a11599c 124nodist_lib_libfrr_la_SOURCES = \
a513824c 125 yang/frr-filter.yang.c \
3a11599c 126 yang/frr-interface.yang.c \
686d244f 127 yang/frr-route-map.yang.c \
3a11599c 128 yang/frr-route-types.yang.c \
3a7262b6 129 yang/frr-vrf.yang.c \
8b043166 130 yang/frr-routing.yang.c \
7441ea1a 131 yang/frr-nexthop.yang.c \
e6a0538b 132 yang/ietf/ietf-routing-types.yang.c \
b0f502c5 133 yang/ietf/ietf-interfaces.yang.c \
bc8c00cc 134 yang/ietf/ietf-bgp-types.yang.c \
3a11599c
DL
135 yang/frr-module-translator.yang.c \
136 # end
137
74dc19a2 138vtysh_scan += \
2768748b
DL
139 lib/distribute.c \
140 lib/filter.c \
b62578bd 141 lib/filter_cli.c \
2768748b
DL
142 lib/if.c \
143 lib/if_rmap.c \
144 lib/keychain.c \
145 lib/lib_vty.c \
48843422 146 lib/log_vty.c \
2768748b
DL
147 lib/nexthop_group.c \
148 lib/plist.c \
149 lib/routemap.c \
150 lib/routemap_cli.c \
c4e57cd5 151 lib/spf_backoff.c \
ee4dcee8 152 lib/thread.c \
2768748b
DL
153 lib/vrf.c \
154 lib/vty.c \
74dc19a2
DL
155 # end
156# can be loaded as DSO - always include for vtysh
2768748b 157vtysh_scan += lib/agentx.c
74dc19a2 158
1c2facd1 159if SQLITE3
fdbd8086 160lib_libfrr_la_LIBADD += $(SQLITE3_LIBS)
1c2facd1
RW
161lib_libfrr_la_SOURCES += lib/db.c
162endif
163
94cfb069
DL
164clippy_scan += \
165 lib/if.c \
b62578bd 166 lib/filter_cli.c \
94cfb069
DL
167 lib/log_vty.c \
168 lib/nexthop_group.c \
169 lib/northbound_cli.c \
170 lib/plist.c \
171 lib/routemap_cli.c \
45f01188 172 lib/thread.c \
94cfb069 173 lib/vty.c \
1c6261a9 174 lib/zlog_5424_cli.c \
94cfb069 175 # end
4a121f99
DL
176
177pkginclude_HEADERS += \
8e1f6512 178 lib/agg_table.h \
bcea0c0f 179 lib/atomlist.h \
4a121f99
DL
180 lib/bfd.h \
181 lib/bitfield.h \
182 lib/buffer.h \
183 lib/checksum.h \
14beb548 184 lib/mlag.h \
4a121f99
DL
185 lib/command.h \
186 lib/command_graph.h \
187 lib/command_match.h \
de1a880c 188 lib/compiler.h \
fd8e262a 189 lib/cspf.h \
4a121f99 190 lib/csv.h \
1c2facd1 191 lib/db.h \
aea03ad6 192 lib/debug.h \
96673e06 193 lib/defaults.h \
4a121f99 194 lib/distribute.h \
3155489a 195 lib/ferr.h \
4a121f99 196 lib/filter.h \
cd85bc2e 197 lib/freebsd-queue.h \
5dbb0a7b 198 lib/frrlua.h \
5f98c815 199 lib/frrscript.h \
4a121f99
DL
200 lib/frr_pthread.h \
201 lib/frratomic.h \
3e41733f 202 lib/frrcu.h \
fe011935 203 lib/frrstr.h \
4a121f99
DL
204 lib/getopt.h \
205 lib/graph.h \
206 lib/hash.h \
207 lib/hook.h \
17136bf2 208 lib/iana_afi.h \
a94eca09 209 lib/id_alloc.h \
4a121f99
DL
210 lib/if.h \
211 lib/if_rmap.h \
212 lib/imsg.h \
213 lib/ipaddr.h \
214 lib/jhash.h \
215 lib/json.h \
216 lib/keychain.h \
24e7c5c8 217 lib/ldp_sync.h \
b66d022e 218 lib/lib_errors.h \
1c0d8808 219 lib/lib_vty.h \
4a121f99 220 lib/libfrr.h \
912d45a1 221 lib/libfrr_trace.h \
4a121f99
DL
222 lib/libospf.h \
223 lib/linklist.h \
bbd85e20 224 lib/link_state.h \
4a121f99 225 lib/log.h \
f73126c3 226 lib/log_vty.h \
4a121f99
DL
227 lib/md5.h \
228 lib/memory.h \
4a121f99
DL
229 lib/module.h \
230 lib/monotime.h \
231 lib/mpls.h \
e496b420 232 lib/srv6.h \
4a121f99
DL
233 lib/network.h \
234 lib/nexthop.h \
7ee30f28 235 lib/nexthop_group.h \
50d89650 236 lib/nexthop_group_private.h \
1c2facd1
RW
237 lib/northbound.h \
238 lib/northbound_cli.h \
239 lib/northbound_db.h \
4a121f99
DL
240 lib/ns.h \
241 lib/openbsd-queue.h \
242 lib/openbsd-tree.h \
243 lib/plist.h \
4a121f99 244 lib/prefix.h \
5c25bd87 245 lib/printfrr.h \
4a121f99
DL
246 lib/privs.h \
247 lib/ptm_lib.h \
5c52c06c 248 lib/pullwr.h \
6833ae01 249 lib/pw.h \
4a121f99 250 lib/qobj.h \
cd85bc2e 251 lib/queue.h \
5318d896 252 lib/ringbuf.h \
4a121f99 253 lib/routemap.h \
94effaf0 254 lib/route_opaque.h \
31bfa062 255 lib/sbuf.h \
440d5faa 256 lib/seqlock.h \
4a121f99
DL
257 lib/sha256.h \
258 lib/sigevent.h \
259 lib/skiplist.h \
98ea5be8 260 lib/smux.h \
4a121f99
DL
261 lib/sockopt.h \
262 lib/sockunion.h \
263 lib/spf_backoff.h \
264 lib/srcdest_table.h \
31f937fb 265 lib/srte.h \
4a121f99
DL
266 lib/stream.h \
267 lib/systemd.h \
268 lib/table.h \
269 lib/termtable.h \
270 lib/thread.h \
552e2a30 271 lib/trace.h \
80911bc2 272 lib/typerb.h \
abd71baa 273 lib/typesafe.h \
4a121f99 274 lib/vector.h \
4a121f99
DL
275 lib/vlan.h \
276 lib/vrf.h \
277 lib/vrf_int.h \
278 lib/vty.h \
279 lib/vxlan.h \
280 lib/wheel.h \
281 lib/workqueue.h \
8e427c29 282 lib/xref.h \
1c2facd1
RW
283 lib/yang.h \
284 lib/yang_translator.h \
285 lib/yang_wrappers.h \
4a121f99
DL
286 lib/zclient.h \
287 lib/zebra.h \
0bdeb5e5 288 lib/zlog.h \
1c6261a9 289 lib/zlog_5424.h \
0bdeb5e5 290 lib/zlog_targets.h \
0031a6bb 291 lib/pbr.h \
7441ea1a 292 lib/routing_nb.h \
64dd7736
DL
293 \
294 lib/assert/assert.h \
4a121f99
DL
295 # end
296
58f8a9ec 297
70d27c5b
DL
298nodist_pkginclude_HEADERS += \
299 lib/route_types.h \
300 lib/version.h \
301 # end
302
4a121f99
DL
303noinst_HEADERS += \
304 lib/clippy.h \
4a121f99 305 lib/plist_int.h \
5c25bd87
DL
306 lib/printf/printfcommon.h \
307 lib/printf/printflocal.h \
4a121f99
DL
308 #end
309
d6e76257
DL
310# General note about module and module helper library (libfrrsnmp, libfrrzmq)
311# linking: If we're linking libfrr statically into daemons, we *must* remove
312# libfrr from modules because modules will always link it in dynamically and
313# thus 2 copies of libfrr will be loaded... hilarity ensues.
314#
315# Not linking libfrr into modules should generally work fine because the
316# executable refers to libfrr either way and the dynamic linker should make
317# libfrr available to modules. If some OS platform has a dynamic linker that
318# doesn't do that, libfrr needs to be readded to modules, but _only_ _if_
319# it's not linked into daemons statically.
320
4a121f99
DL
321#
322# SNMP support
323#
324if SNMP
325lib_LTLIBRARIES += lib/libfrrsnmp.la
326endif
327
0c4285d7 328lib_libfrrsnmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
63116a70 329lib_libfrrsnmp_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
d6e76257 330lib_libfrrsnmp_la_LIBADD = $(SNMP_LIBS)
4a121f99
DL
331lib_libfrrsnmp_la_SOURCES = \
332 lib/agentx.c \
4a121f99
DL
333 lib/snmp.c \
334 # end
335
fe9e7b71
DL
336#
337# c-ares support
338#
339if CARES
340lib_LTLIBRARIES += lib/libfrrcares.la
341pkginclude_HEADERS += lib/resolver.h
433d9af2 342vtysh_scan += lib/resolver.c
fe9e7b71
DL
343endif
344
0c4285d7 345lib_libfrrcares_la_CFLAGS = $(AM_CFLAGS) $(CARES_CFLAGS)
63116a70 346lib_libfrrcares_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
fe9e7b71
DL
347lib_libfrrcares_la_LIBADD = $(CARES_LIBS)
348lib_libfrrcares_la_SOURCES = \
349 lib/resolver.c \
350 #end
351
b6116506
DL
352#
353# ZeroMQ support
354#
355if ZEROMQ
356lib_LTLIBRARIES += lib/libfrrzmq.la
357pkginclude_HEADERS += lib/frr_zmq.h
358endif
359
0c4285d7 360lib_libfrrzmq_la_CFLAGS = $(AM_CFLAGS) $(ZEROMQ_CFLAGS)
63116a70 361lib_libfrrzmq_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
d6e76257 362lib_libfrrzmq_la_LIBADD = $(ZEROMQ_LIBS)
b6116506
DL
363lib_libfrrzmq_la_SOURCES = \
364 lib/frr_zmq.c \
365 #end
366
5bce33b3
RW
367#
368# Tail-f's ConfD support
369#
370if CONFD
371module_LTLIBRARIES += lib/confd.la
372endif
373
0c4285d7 374lib_confd_la_CFLAGS = $(AM_CFLAGS) $(CONFD_CFLAGS)
63116a70 375lib_confd_la_LDFLAGS = $(MODULE_LDFLAGS)
fdbd8086 376lib_confd_la_LIBADD = lib/libfrr.la $(CONFD_LIBS)
5bce33b3
RW
377lib_confd_la_SOURCES = lib/northbound_confd.c
378
a7ca2199
RW
379#
380# Sysrepo support
381#
382if SYSREPO
383module_LTLIBRARIES += lib/sysrepo.la
384endif
385
0c4285d7 386lib_sysrepo_la_CFLAGS = $(AM_CFLAGS) $(SYSREPO_CFLAGS)
63116a70 387lib_sysrepo_la_LDFLAGS = $(MODULE_LDFLAGS)
fdbd8086 388lib_sysrepo_la_LIBADD = lib/libfrr.la $(SYSREPO_LIBS)
a7ca2199
RW
389lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c
390
ec2ac5f2
RW
391#
392# gRPC northbound plugin
393#
394if GRPC
395module_LTLIBRARIES += lib/grpc.la
396endif
397
398lib_grpc_la_CXXFLAGS = $(WERROR) $(GRPC_CFLAGS)
63116a70 399lib_grpc_la_LDFLAGS = $(MODULE_LDFLAGS)
ec2ac5f2
RW
400lib_grpc_la_LIBADD = lib/libfrr.la grpc/libfrrgrpc_pb.la $(GRPC_LIBS)
401lib_grpc_la_SOURCES = lib/northbound_grpc.cpp
402
4a121f99
DL
403#
404# CLI utilities
405#
406noinst_PROGRAMS += \
4a121f99
DL
407 lib/grammar_sandbox \
408 # end
409
89727c8d
DL
410if BUILD_CLIPPY
411noinst_PROGRAMS += lib/clippy
412else
a71c5039
DL
413if HOSTTOOLS_CLIPPY
414$(CLIPPY):
415 @$(MAKE) -C $(top_builddir)/hosttools lib/route_types.h lib/clippy
416endif
89727c8d
DL
417endif
418
4a121f99
DL
419lib_grammar_sandbox_SOURCES = \
420 lib/grammar_sandbox_main.c
421lib_grammar_sandbox_LDADD = \
422 lib/libfrr.la
423
64dd7736 424lib_clippy_CPPFLAGS = $(CPPFLAGS_BASE) -D_GNU_SOURCE -DBUILDING_CLIPPY
0c4285d7 425lib_clippy_CFLAGS = $(AC_CFLAGS) $(PYTHON_CFLAGS)
5609b3af 426lib_clippy_LDADD = $(PYTHON_LIBS) $(UST_LIBS) -lelf
63116a70
DL
427# no $(SAN_FLAGS) here
428lib_clippy_LDFLAGS = -export-dynamic $(AC_LDFLAGS) $(AC_LDFLAGS_EXEC)
4a121f99 429lib_clippy_SOURCES = \
8e427c29 430 lib/jhash.c \
4a121f99
DL
431 lib/clippy.c \
432 lib/command_graph.c \
433 lib/command_lex.l \
434 lib/command_parse.y \
435 lib/command_py.c \
436 lib/defun_lex.l \
5609b3af 437 lib/elf_py.c \
4a121f99 438 lib/graph.c \
912d45a1 439 lib/libfrr_trace.c \
4a121f99 440 lib/memory.c \
5609b3af 441 lib/typesafe.c \
4a121f99
DL
442 lib/vector.c \
443 # end
444
aad24c5b
DL
445# (global) clippy rules for all directories
446
447AM_V_CLIPPY = $(am__v_CLIPPY_$(V))
448am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
449am__v_CLIPPY_0 = @echo " CLIPPY " $@;
450am__v_CLIPPY_1 =
451
a71c5039 452CLIPPY_DEPS = $(CLIPPY) $(top_srcdir)/python/clidef.py
aad24c5b 453
8fb40377 454SUFFIXES += _clippy.c
aad24c5b 455.c_clippy.c:
a71c5039 456 $(AM_V_CLIPPY) $(CLIPPY) $(top_srcdir)/python/clidef.py -o $@ $<
aad24c5b 457
a1e6ab1e
DL
458# xrelfo, the ELF xref extractor
459
460AM_V_XRELFO = $(am__v_XRELFO_$(V))
461am__v_XRELFO_ = $(am__v_XRELFO_$(AM_DEFAULT_VERBOSITY))
462am__v_XRELFO_0 = @echo " XRELFO " $@;
463am__v_XRELFO_1 =
464
2621bb8b
DL
465if DEV_BUILD
466XRELFO_FLAGS = -Wlog-format -Wlog-args
467else
468XRELFO_FLAGS =
469endif
470
a1e6ab1e
DL
471SUFFIXES += .xref
472%.xref: % $(CLIPPY)
13f9aea3 473 $(AM_V_XRELFO) $(CLIPPY) $(top_srcdir)/python/xrelfo.py $(WERROR) $(XRELFO_FLAGS) -o $@ $<
a1e6ab1e
DL
474
475# dependencies added in python/makefile.py
476frr.xref:
477 $(AM_V_XRELFO) $(CLIPPY) $(top_srcdir)/python/xrelfo.py -o $@ $^
478all-am: frr.xref
479
480clean-xref:
481 -rm -rf $(xrefs) frr.xref
482clean-local: clean-xref
483
aad24c5b
DL
484## automake's "ylwrap" is a great piece of GNU software... not.
485.l.c:
486 $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $<
487.y.c:
488 $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $<
4a121f99
DL
489
490#
491# generated sources & extra foo
492#
493EXTRA_DIST += \
494 lib/command_lex.h \
70d27c5b 495 lib/command_parse.h \
4a121f99 496 lib/gitversion.pl \
4a121f99
DL
497 lib/route_types.pl \
498 lib/route_types.txt \
499 # end
500
501BUILT_SOURCES += \
4a121f99
DL
502 lib/gitversion.h \
503 lib/route_types.h \
504 # end
505
f1b32b2e
DL
506## force route_types.h
507$(lib_clippy_OBJECTS): lib/route_types.h
508$(lib_libfrr_la_OBJECTS): lib/route_types.h
509
4a121f99
DL
510AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
511
512lib/command_lex.h: lib/command_lex.c
513 @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi
514 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
f1b32b2e 515lib/command_lex.lo: lib/command_parse.h
4a121f99 516lib/command_parse.lo: lib/command_lex.h
fdbd8086
DL
517lib/clippy-command_lex.$(OBJEXT): lib/command_parse.h
518lib/clippy-command_parse.$(OBJEXT): lib/command_lex.h
f1b32b2e 519lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
4a121f99
DL
520lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
521
b3b4dfa5
IR
522rt_enabled =
523
524if BABELD
525rt_enabled += --enabled babeld
526endif
527if BFDD
528rt_enabled += --enabled bfdd
529endif
530if BGPD
531rt_enabled += --enabled bgpd
532if ENABLE_BGP_VNC
533rt_enabled += --enabled bgpd-vnc
534endif
535endif
536if EIGRPD
537rt_enabled += --enabled eigrpd
538endif
539if ISISD
540rt_enabled += --enabled isisd
541endif
542if FABRICD
543rt_enabled += --enabled fabricd
544endif
545if LDPD
546rt_enabled += --enabled ldpd
547endif
548if NHRPD
549rt_enabled += --enabled nhrpd
550endif
551if OSPFD
552rt_enabled += --enabled ospfd
553endif
554if OSPF6D
555rt_enabled += --enabled ospf6d
556endif
557if PBRD
558rt_enabled += --enabled pbrd
559endif
560if PIMD
561rt_enabled += --enabled pimd
562endif
563if RIPD
564rt_enabled += --enabled ripd
565endif
566if RIPNGD
567rt_enabled += --enabled ripngd
568endif
569if SHARPD
570rt_enabled += --enabled sharpd
571endif
572if ZEBRA
573rt_enabled += --enabled zebra
574endif
575
4a121f99 576lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
b3b4dfa5 577 $(PERL) $(top_srcdir)/lib/route_types.pl $(rt_enabled) < $(top_srcdir)/lib/route_types.txt > $@
67cf020d 578DISTCLEANFILES += lib/route_types.h
4a121f99
DL
579
580if GIT_VERSION
581# bit of a trick here to always have up-to-date git stamps without triggering
582# unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
583# but if we use that on gitversion.h it'll ripple through the .c file deps.
584# (even if gitversion.h's file timestamp doesn't change, make will think it
585# did, because of .PHONY...)
586
9e53b315 587PHONY_GITVERSION=lib/gitversion.h.tmp
4a121f99
DL
588.SILENT: lib/gitversion.h lib/gitversion.h.tmp
589GITH=lib/gitversion.h
590lib/gitversion.h.tmp: $(top_srcdir)/.git
fdbd8086 591 $(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
4a121f99 592lib/gitversion.h: lib/gitversion.h.tmp
bd402424 593 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
4a121f99
DL
594
595else
9e53b315 596PHONY_GITVERSION=lib/gitversion.h
4a121f99
DL
597lib/gitversion.h:
598 true
599endif
9e53b315 600.PHONY: $(PHONY_GITVERSION)