]> git.proxmox.com Git - mirror_ovs.git/blame - include/openvswitch/automake.mk
automake: Clean up cxxtest.cc.
[mirror_ovs.git] / include / openvswitch / automake.mk
CommitLineData
534985fd
TG
1openvswitchincludedir = $(includedir)/openvswitch
2openvswitchinclude_HEADERS = \
cab50449 3 include/openvswitch/compiler.h \
3e8a2ad1 4 include/openvswitch/dynamic-string.h \
ee89ea7b 5 include/openvswitch/hmap.h \
1182038f 6 include/openvswitch/flow.h \
b211014d 7 include/openvswitch/geneve.h \
ee89ea7b 8 include/openvswitch/json.h \
55951e15 9 include/openvswitch/list.h \
b129cc98 10 include/openvswitch/netdev.h \
e29747e4 11 include/openvswitch/match.h \
064d7f84 12 include/openvswitch/meta-flow.h \
0d71302e 13 include/openvswitch/namemap.h \
64c96779 14 include/openvswitch/ofpbuf.h \
b598f214 15 include/openvswitch/ofp-actions.h \
0d71302e
BP
16 include/openvswitch/ofp-bundle.h \
17 include/openvswitch/ofp-connection.h \
f839892a 18 include/openvswitch/ofp-ed-props.h \
e03c096d 19 include/openvswitch/ofp-errors.h \
0d71302e
BP
20 include/openvswitch/ofp-flow.h \
21 include/openvswitch/ofp-group.h \
22 include/openvswitch/ofp-ipfix.h \
23 include/openvswitch/ofp-match.h \
24 include/openvswitch/ofp-meter.h \
25 include/openvswitch/ofp-monitor.h \
d271907f 26 include/openvswitch/ofp-msgs.h \
0d71302e 27 include/openvswitch/ofp-packet.h \
7888d2a6 28 include/openvswitch/ofp-parse.h \
0d71302e 29 include/openvswitch/ofp-port.h \
25d436fb 30 include/openvswitch/ofp-print.h \
66bd43fa 31 include/openvswitch/ofp-prop.h \
0d71302e
BP
32 include/openvswitch/ofp-protocol.h \
33 include/openvswitch/ofp-queue.h \
34 include/openvswitch/ofp-switch.h \
35 include/openvswitch/ofp-table.h \
f4248336 36 include/openvswitch/ofp-util.h \
b2bd6da6 37 include/openvswitch/packets.h \
fd016ae3 38 include/openvswitch/poll-loop.h \
dc02e1eb 39 include/openvswitch/rconn.h \
ee89ea7b 40 include/openvswitch/shash.h \
904e0804 41 include/openvswitch/thread.h \
d668c4a9 42 include/openvswitch/token-bucket.h \
841b052a 43 include/openvswitch/tun-metadata.h \
ae06a561 44 include/openvswitch/type-props.h \
3f47a0c5 45 include/openvswitch/types.h \
b0248b2a 46 include/openvswitch/util.h \
d5dc60f0 47 include/openvswitch/uuid.h \
e6211adc 48 include/openvswitch/version.h \
4a1f523f 49 include/openvswitch/vconn.h \
3d2fbd70
JS
50 include/openvswitch/vlog.h \
51 include/openvswitch/nsh.h
994bfc29
BP
52
53if HAVE_CXX
54# OVS does not use C++ itself, but it provides public header files
55# that a C++ compiler should accept, so when --enable-Werror is in
56# effect and a C++ compiler is available, we build a C++ source file
57# that #includes all the public headers, as a way to ensure that they
58# are acceptable as C++.
59noinst_LTLIBRARIES += include/openvswitch/libcxxtest.la
60nodist_include_openvswitch_libcxxtest_la_SOURCES = include/openvswitch/cxxtest.cc
adabd65d
BP
61include/openvswitch/cxxtest.cc: \
62 include/openvswitch/automake.mk $(top_builddir)/config.status
63 $(AM_V_GEN){ echo "#include <config.h>"; \
64 for header in $(openvswitchinclude_HEADERS); do \
65 echo $$header; \
66 done | sed 's,^include/\(.*\)$$,#include <\1>,'; } > $@
914ea15d 67CLEANFILES += include/openvswitch/cxxtest.cc
994bfc29 68endif
ec30ca5f
BP
69
70# OVS does not use C++ itself, but it provides public header files
71# that a C++ compiler should accept, so we make sure that every public
72# header file has the proper extern declaration for use with C++.
73#
74# Some header files don't declare any external functions, so they
75# don't really need extern "C". We only white list a couple of these
76# below, which are the ones that seem unlikely to ever declare
77# external functions. For the rest, we add extern "C" anyway; it
78# doesn't hurt.
79ALL_LOCAL += cxx-check
80cxx-check: $(openvswitchinclude_HEADERS)
81 @if LC_ALL=C grep -L 'extern "C"' $^ | \
82 $(EGREP) -v 'version.h|compiler.h'; \
83 then \
84 echo "See above list of public headers lacking 'extern \"C\"'."; \
85 exit 1; \
86 fi
87 $(AM_V_GEN)touch $@
88CLEANFILES += cxx-check