]> git.proxmox.com Git - mirror_frr.git/blobdiff - Makefile.am
vrrpd: add frr-vrf yang module
[mirror_frr.git] / Makefile.am
index 851cefc85c5d5583957af6aa8d576bf51632e805..a959fd9e5a8805aa29b8ba37142944ac4b74f12e 100644 (file)
@@ -89,9 +89,11 @@ clippy-only: Makefile lib/clippy config.h
 #AUTODERP# endif
 
 EXTRA_DIST =
+EXTRA_PROGRAMS =
 BUILT_SOURCES =
 CLEANFILES =
 DISTCLEANFILES =
+SUFFIXES =
 
 examplesdir = $(exampledir)
 
@@ -110,6 +112,7 @@ dist_examples_DATA =
 dist_yangmodels_DATA =
 man_MANS =
 vtysh_scan =
+clippy_scan =
 
 ## libtool, the self-made GNU scourge
 ## ... this should fix relinking
@@ -125,6 +128,7 @@ include doc/manpages/subdir.am
 include doc/developer/subdir.am
 include include/subdir.am
 include lib/subdir.am
+include mlag/subdir.am
 include zebra/subdir.am
 include watchfrr/subdir.am
 include qpb/subdir.am
@@ -182,6 +186,8 @@ EXTRA_DIST += \
        \
        python/clidef.py \
        python/clippy/__init__.py \
+       python/makevars.py \
+       python/makefile.py \
        \
        redhat/frr.logrotate \
        redhat/frr.pam \
@@ -227,14 +233,48 @@ EXTRA_DIST += \
        vrrpd/Makefile \
        # end
 
-noinst_HEADERS += defaults.h
+AM_V_LLVM_BC = $(am__v_LLVM_BC_$(V))
+am__v_LLVM_BC_ = $(am__v_LLVM_BC_$(AM_DEFAULT_VERBOSITY))
+am__v_LLVM_BC_0 = @echo "  LLVM.BC " $@;
+am__v_LLVM_BC_1 = 
 
-clean-local: clean-python
-.PHONY: clean-python
+AM_V_LLVM_LD = $(am__v_LLVM_LD_$(V))
+am__v_LLVM_LD_ = $(am__v_LLVM_LD_$(AM_DEFAULT_VERBOSITY))
+am__v_LLVM_LD_0 = @echo "  LLVM.LD " $@;
+am__v_LLVM_LD_1 = 
+
+SUFFIXES += .lo.bc .o.bc
+
+.o.o.bc:
+       $(AM_V_LLVM_BC)$(COMPILE) -emit-llvm -c -o $@ $(patsubst %.o,%.c,$<)
+.lo.lo.bc:
+       $(AM_V_LLVM_BC)$(COMPILE) -emit-llvm -c -o $@ $(patsubst %.lo,%.c,$<)
+
+%.cg.json: %.bc tools/frr-llvm-cg
+       tools/frr-llvm-cg -o $@ $<
+%.cg.dot: %.cg.json
+       $(PYTHON) $(top_srcdir)/python/callgraph-dot.py $< $@
+%.cg.svg: %.cg.dot
+       @echo if the following command fails, you need to install graphviz.
+       @echo also, the output is nondeterministic. run it multiple times and use the nicest output.
+       @echo tuning parameters may yield nicer looking graphs as well.
+       fdp -GK=0.7 -Gstart=42231337 -Gmaxiter=2000 -Elen=2 -Gnodesep=1.5 -Tsvg -o$@ $<
+# don't delete intermediaries
+.PRECIOUS: %.cg.json %.cg.dot
+
+# <lib>.la.bc, <lib>.a.bc and <daemon>.bc targets are generated by
+# python/makefile.py
+LLVM_LINK = llvm-link-$(llvm_version)
+
+clean-local: clean-python clean-llvm-bitcode
+.PHONY: clean-python clean-llvm-bitcode
 clean-python:
        find . -name __pycache__ -o -name .pytest_cache | xargs rm -rf
        find . -name "*.pyc" -o -name "*_clippy.c" | xargs rm -f
 
+clean-llvm-bitcode:
+       find . -name "*.bc" -o -name "*.cg.json" -o -name "*.cg.dot" -o -name "*.cg.svg" | xargs rm -f
+
 redistclean:
        $(MAKE) distclean CONFIG_CLEAN_FILES="$(filter-out $(EXTRA_DIST), $(CONFIG_CLEAN_FILES))"