Add guide to porting Open vSwitch.
[sliver-openvswitch.git] / Makefile.am
1 # Copyright (C) 2007, 2008, 2009, 2010 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 += $(NCURSES_CFLAGS)
14 AM_CPPFLAGS += $(PCRE_CFLAGS)
15 AM_CPPFLAGS += -I $(top_srcdir)/include
16 AM_CPPFLAGS += -I $(top_srcdir)/lib
17
18 AM_CFLAGS = -Wstrict-prototypes
19 AM_CFLAGS += $(WARNING_FLAGS)
20
21 if NDEBUG
22 AM_CPPFLAGS += -DNDEBUG
23 AM_CFLAGS += -fomit-frame-pointer
24 else
25 AM_LDFLAGS = -export-dynamic
26 endif
27
28 BUILT_SOURCES =
29 CLEANFILES =
30 DISTCLEANFILES =
31 EXTRA_DIST = \
32         CodingStyle \
33         INSTALL.KVM \
34         INSTALL.Linux \
35         INSTALL.OpenFlow \
36         INSTALL.SSL \
37         INSTALL.XenServer \
38         INSTALL.bridge \
39         INSTALL.userspace \
40         NOTICE \
41         PORTING \
42         README-gcov \
43         REPORTING-BUGS \
44         SubmittingPatches \
45         boot.sh
46 bin_PROGRAMS =
47 sbin_PROGRAMS =
48 bin_SCRIPTS =
49 DIST_HOOKS =
50 dist_man_MANS =
51 dist_pkgdata_DATA =
52 dist_pkgdata_SCRIPTS =
53 dist_sbin_SCRIPTS =
54 man_MANS =
55 noinst_DATA =
56 noinst_HEADERS =
57 noinst_LIBRARIES =
58 noinst_PROGRAMS =
59 noinst_SCRIPTS =
60 OVSIDL_BUILT =
61 SUFFIXES =
62
63 EXTRA_DIST += \
64         build-aux/update-debian-changelog \
65         soexpand.pl
66
67 ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
68
69 SUFFIXES += .in
70 .in:
71         $(PERL) $(srcdir)/soexpand.pl -I$(srcdir) < $< | \
72             sed \
73                 -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
74                 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
75                 -e 's,[@]PERL[@],$(PERL),g' \
76                 -e 's,[@]PYTHON[@],$(PYTHON),g' \
77                 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
78                 -e 's,[@]VERSION[@],$(VERSION),g' \
79                 -e 's,[@]localstatedir[@],$(localstatedir),g' \
80                 -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
81                 -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
82                 -e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \
83                 -e 's,[@]ovsdbmonitordir[@],$(ovsdbmonitordir),g' \
84             > $@.tmp
85         @if head -n 1 $@.tmp | grep -q '#!'; then \
86             echo chmod +x $@.tmp; \
87             chmod +x $@.tmp; \
88         fi
89         mv $@.tmp $@
90
91 # If we're checked out from a Git repository, make sure that every
92 # file that is in Git is distributed.
93 dist-hook-git:
94         if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then    \
95           rc=0;                                                               \
96           for d in `cd $(srcdir) && git ls-files`; do                         \
97             if test ! -e $(distdir)/$$d; then                                 \
98               case $$d in # (                                                 \
99                 .gitignore|*/.gitignore) ;; # (                               \
100                 *)                                                            \
101                    if test $$rc = 0; then                                     \
102                      echo "The distribution is missing the following files:"; \
103                      rc=1;                                                    \
104                    fi;                                                        \
105                    echo "$$d";                                                \
106                    ;;                                                         \
107               esac;                                                           \
108             fi                                                                \
109           done;                                                               \
110           exit $$rc;                                                          \
111         fi
112 DIST_HOOKS += dist-hook-git
113
114 dist-hook: $(DIST_HOOKS)
115 .PHONY: $(DIST_HOOKS)
116
117 include lib/automake.mk
118 include ofproto/automake.mk
119 include utilities/automake.mk
120 include tests/automake.mk
121 include include/automake.mk
122 include third-party/automake.mk
123 include debian/automake.mk
124 include vswitchd/automake.mk
125 include ovsdb/automake.mk
126 include xenserver/automake.mk
127 include extras/ezio/automake.mk
128