-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMake.vars
171 lines (148 loc) · 5.17 KB
/
Make.vars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# -*- makefile -*-
builddir = .
AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\"
AM_CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\"
pkglocalstatedir = $(localstatedir)/$(PACKAGE)
AM_CPPFLAGS += -DPKGLOCALSTATEDIR=\"$(pkglocalstatedir)\"
pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
AM_CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
# Include paths.
AM_CPPFLAGS += -I $(top_srcdir)/../../include
AM_CPPFLAGS += $(OPENFLOW_CPPFLAGS)
AM_CPPFLAGS += $(BOOST_CPPFLAGS)
AM_CPPFLAGS += -include $(top_builddir)/config.h
# GNU C library definitions.
AM_CPPFLAGS += -D_GNU_SOURCE=1
if NDEBUG
AM_CPPFLAGS += -DNDEBUG
endif
AM_CPPFLAGS += -D_REENTRANT
# GNU C++ library definitions.
AM_CPPFLAGS += -D__STDC_LIMIT_MACROS=1
AM_CPPFLAGS += -D__STDC_FORMAT_MACROS=1
AM_CPPFLAGS += -D__STDC_CONSTANT_MACROS=1
if !NDEBUG
AM_CPPFLAGS += -D_GLIBCXX_CONCEPT_CHECKS=1
AM_CPPFLAGS += -D_GLIBCXX_DEBUG=1
AM_CPPFLAGS += -D_GLIBCXX_DEBUG_PEDANTIC=1
endif
COMMON_FLAGS =
if NDEBUG
if !PROFILING
COMMON_FLAGS += -fomit-frame-pointer
endif
endif
COMMON_FLAGS += -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security
AM_CXXFLAGS = $(COMMON_FLAGS)
AM_CFLAGS = $(COMMON_FLAGS)
AM_CFLAGS += -Wstrict-prototypes
AM_CFLAGS += -Wmissing-prototypes
LDADD =
AM_LDFLAGS = -R$(pkglibdir)
if !NDEBUG
AM_LDFLAGS += -export-dynamic
endif
# set python runtimefiles to be installed in the same directory as pkg
pkglib_SCRIPTS = $(NOX_RUNTIMEFILES) $(NOX_PYBUILDFILES)
BUILT_SOURCES = $(NOX_PYBUILDFILES)
# Runtime-files build and clean rules
nox-runtimefiles-build:
@dlist="$(NOX_RUNTIMEFILES)";for f in $$dlist; do \
if test -f ${srcdir}/$$f && test ! -f ${builddir}/$$f; then \
echo "Soft-linking file: $(builddir)/$$f";\
ln -sf $(srcdir)/$$f $(builddir)/$$f;\
fi;\
done;
nox-runtimefiles-clean:
@dlist="$(NOX_RUNTIMEFILES)";for f in $$dlist; do \
if test ! -f $(builddir)/$$f; then \
echo "Removing soft-link: $(builddir)/$$f";\
rm -f $(builddir)/$$f;\
fi;\
done;
# Mako template build and clean rules
mako-template-build:
@if test -d $(srcdir)/templates; then\
if test ! -d $(builddir)/templates; then\
echo "Soft-linking mako templates in: $(builddir)/templates";\
ln -snf $(srcdir)/templates $(builddir)/templates;\
fi;\
if test ! -d $(builddir)/mako_modules; then\
echo "Creating mako modules directory: $(builddir)/mako_modules";\
mkdir -p $(builddir)/mako_modules;\
fi;\
else\
echo "The target mako-template-build is a dependency in the";\
echo "Makefile but there is no 'templates' subdirectory.";\
false;\
fi;
mako-template-clean:
rm -rf $(builddir)/mako_modules
@if test -L $(builddir)/templates; then\
echo "Removing soft-link: $(builddir)/templates";\
rm -f $(builddir)/templates;\
fi
WWW_BUILD_SUBDIR=$(top_builddir)/../apps/coreui/www
# Static www build and clean rules
static-www-build:
@if test -d $(srcdir)/static_www; then\
if test ! -d $(WWW_BUILD_SUBDIR)/$(MODULE_BASE_PATH); then\
echo "Creating module www directory: $(WWW_BUILD_SUBDIR)/$(MODULE_BASE_PATH)";\
mkdir -p $(WWW_BUILD_SUBDIR)/$(MODULE_BASE_PATH);\
fi;\
echo "Soft-linking 'static_www' directory: $(WWW_BUILD_SUBDIR)/$(MODULE_BASE_PATH)/$(MODULE)";\
ln -snf $(MODULE_BASE_ESCAPE)/$(top_srcdir)/../../$(MODULE_BASE_PATH)/$(MODULE)/static_www $(WWW_BUILD_SUBDIR)/$(MODULE_BASE_PATH)/$(MODULE);\
else\
echo "The target static-www-build is a dependency in the";\
echo "Makefile but there is no 'static_www' subdirectory here.";\
false;\
fi;
static-www-clean: # Intentionally doesn't do anything
# NOX rules for setting up links in remote build tree
nox-all-local:
@dlist="$(NOX_RUNTIMEFILES)";for f in $$dlist; do \
if test -f $(srcdir)/$$f && test ! -f $$f; then \
ln -sf $(srcdir)/$$f $(builddir)/$$f;\
fi;\
done;
@dlist="$(NOX_PYLIBFILES)";for f in $$dlist; do \
if test ! -f $$f; then \
ln -sf $(builddir)/.libs/$$f $(builddir)/$$f;\
fi;\
done;
# NOX clean rules
nox-clean-local:
@find . -maxdepth 1 -name "*.py" -type l -exec rm -rf {} \;
@rm -f *_wrap.cc *.pyc *.la *.so *.o
@dlist="$(NOX_PYBUILDFILES)";for f in $$dlist; do \
if test -f $(builddir)/$$f; then \
rm -f $(builddir)/$$f;\
fi;\
done;
# Installation rules
pkglibdir = $(bindir)/nox/ext/$(subdir)
nox_installsubdir = $(DESTDIR)$(bindir)/nox/ext/$(subdir)
nox_installwwwdir = $(DESTDIR)$(bindir)/nox/apps/coreui/www
nox-install-local:
@if test ! -d $(nox_installsubdir); then\
mkdir -p $(nox_installsubdir);\
fi
@dlist="$(BASE_WWW_FILES)";for f in $$dlist; do \
if test -e ${srcdir}/base_www/$$f; then \
cp -rf $(srcdir)/base_www/$$f $(nox_installsubdir)/www/$$f;\
fi;\
done;
@if test -d $(srcdir)/templates; then\
cp -rf $(srcdir)/templates $(nox_installsubdir)/templates;\
if test ! -d $(nox_installsubdir)/mako_modules; then\
mkdir -p $(builddir)/mako_modules;\
fi;\
fi;
@if test -d $(srcdir)/static_www; then\
if test ! -d $(nox_installwwwdir)/$(MODULE_BASE_PATH); then\
echo "Creating module www directory: $(nox_installwwwdir)/$(MODULE_BASE_PATH)";\
mkdir -p $(nox_installwwwdir)/$(MODULE_BASE_PATH);\
fi;\
echo "Soft-linking 'static_www' directory: $(nox_installwwwdir)/$(MODULE_BASE_PATH)/$(MODULE)";\
cp -rf $(srcdir)/static_www $(nox_installwwwdir)/$(MODULE_BASE_PATH)/$(MODULE);\
fi;