]> git.proxmox.com Git - mirror_ovs.git/blob - Makefile.am
hfsc: min-rate tweaks.
[mirror_ovs.git] / Makefile.am
1 # Copyright (C) 2007, 2008, 2009, 2010, 2011 Nicira Networks, Inc.
2 #
3 # Copying and distribution of this file, with or without modification,
4 # are permitted in any medium without royalty provided the copyright
5 # notice and this notice are preserved. This file is offered as-is,
6 # without warranty of any kind.
7
8 AUTOMAKE_OPTIONS = foreign subdir-objects
9 ACLOCAL_AMFLAGS = -I m4
10 SUBDIRS = datapath
11
12 AM_CPPFLAGS = $(SSL_CFLAGS)
13 AM_CPPFLAGS += -I $(top_srcdir)/include
14 AM_CPPFLAGS += -I $(top_srcdir)/lib
15 AM_CPPFLAGS += -I $(top_builddir)/lib
16
17 AM_CFLAGS = -Wstrict-prototypes
18 AM_CFLAGS += $(WARNING_FLAGS)
19
20 if NDEBUG
21 AM_CPPFLAGS += -DNDEBUG
22 AM_CFLAGS += -fomit-frame-pointer
23 else
24 AM_LDFLAGS = -export-dynamic
25 endif
26
27 ALL_LOCAL =
28 BUILT_SOURCES =
29 CLEANFILES =
30 CLEAN_LOCAL =
31 DISTCLEANFILES =
32 EXTRA_DIST = \
33 CodingStyle \
34 DESIGN \
35 INSTALL.KVM \
36 INSTALL.Linux \
37 INSTALL.OpenFlow \
38 INSTALL.SSL \
39 INSTALL.XenServer \
40 INSTALL.bridge \
41 INSTALL.userspace \
42 NOTICE \
43 PORTING \
44 README-gcov \
45 REPORTING-BUGS \
46 SubmittingPatches \
47 WHY-OVS \
48 boot.sh
49 bin_PROGRAMS =
50 sbin_PROGRAMS =
51 bin_SCRIPTS =
52 DIST_HOOKS =
53 dist_man_MANS =
54 dist_pkgdata_DATA =
55 dist_pkgdata_SCRIPTS =
56 dist_sbin_SCRIPTS =
57 man_MANS =
58 noinst_DATA =
59 noinst_HEADERS =
60 noinst_LIBRARIES =
61 noinst_PROGRAMS =
62 noinst_SCRIPTS =
63 OVSIDL_BUILT =
64 SUFFIXES =
65 check_DATA =
66
67 # This ensures that files added to EXTRA_DIST are always distributed,
68 # even if they are inside an Automake if...endif conditional block that is
69 # disabled by some particular "configure" run. For more information, see:
70 # http://article.gmane.org/gmane.comp.sysutils.automake.general/10891
71 noinst_HEADERS += $(EXTRA_DIST)
72
73 EXTRA_DIST += \
74 soexpand.pl
75
76 ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
77
78 SUFFIXES += .in
79 .in:
80 $(PERL) $(srcdir)/soexpand.pl -I$(srcdir) < $< | \
81 sed \
82 -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
83 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
84 -e 's,[@]PERL[@],$(PERL),g' \
85 -e 's,[@]PYTHON[@],$(PYTHON),g' \
86 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
87 -e 's,[@]VERSION[@],$(VERSION),g' \
88 -e 's,[@]localstatedir[@],$(localstatedir),g' \
89 -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
90 -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
91 -e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \
92 -e 's,[@]ovsdbmonitordir[@],$(ovsdbmonitordir),g' \
93 > $@.tmp
94 @if head -n 1 $@.tmp | grep '#!' > /dev/null; then \
95 echo chmod +x $@.tmp; \
96 chmod +x $@.tmp; \
97 fi
98 mv $@.tmp $@
99
100 # If we're checked out from a Git repository, make sure that every
101 # file that is in Git is distributed.
102 ALL_LOCAL += dist-hook-git
103 dist-hook-git: distfiles
104 @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
105 (cd datapath && $(MAKE) distfiles); \
106 (cat distfiles; sed 's|^|datapath/|' datapath/distfiles) | \
107 sort -u > all-distfiles; \
108 (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \
109 sort -u > all-gitfiles; \
110 comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \
111 if test -s missing-distfiles; then \
112 echo "The distribution is missing the following files:"; \
113 cat missing-distfiles; \
114 exit 1; \
115 fi; \
116 fi
117 CLEANFILES += all-distfiles all-gitfiles missing-distfiles
118 # The following is based on commands for the Automake "distdir" target.
119 distfiles: Makefile
120 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
121 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
122 list='$(DISTFILES)'; \
123 for file in $$list; do echo $$file; done | \
124 sed -e "s|^$$srcdirstrip/||;t" \
125 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | sort -u > $@
126 CLEANFILES += distfiles
127
128 # Check that "struct vlog_ratelimit" is always declared "static".
129 ALL_LOCAL += rate-limit-check
130 rate-limit-check:
131 @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \
132 git --no-pager grep -n -E '^[ ]+struct vlog_rate_limit.*=' $(srcdir); \
133 then \
134 echo "See above for list of violations of the rule that "; \
135 echo "'struct vlog_rate_limit' must always be 'static'"; \
136 exit 1; \
137 fi
138
139 dist-hook: $(DIST_HOOKS)
140 all-local: $(ALL_LOCAL)
141 clean-local: $(CLEAN_LOCAL)
142 .PHONY: $(DIST_HOOKS) $(CLEAN_LOCAL)
143
144 include lib/automake.mk
145 include ofproto/automake.mk
146 include utilities/automake.mk
147 include tests/automake.mk
148 include include/automake.mk
149 include third-party/automake.mk
150 include debian/automake.mk
151 include vswitchd/automake.mk
152 include ovsdb/automake.mk
153 include xenserver/automake.mk
154 include python/ovs/automake.mk