-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makeconf.in
240 lines (200 loc) · 6.89 KB
/
Makeconf.in
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
## -*- mode: Makefile -*-
##
## Copyright (c) 2011-2015 The University of Utah
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of
## the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
###############################################################################
#
# Set a global library version.
#
LIBVERSION = 0.2
#
# Set some XML constants.
#
NS = vmi1
NAMESPACE = http://anathema.flux.utah.edu/schema/vmi/1
#
# Most of the configure-substitution magic is done here.
# All the other makefiles in the NodeOS include
# this fragment
#
# Need the PATH because the older autoconf does not support
# AC_PATH_TOOL which is needed for cross-compilation to work.
#export PATH = @PATH@
export CC = @CC@
export CPP = @CPP@
export CXX = @CXX@
export LD = @CC@ ${CFLAGS}
export STRIP = @STRIP@
export LD = @LD@
export RANLIB = @RANLIB@
export LIBTOOL = @LIBTOOL@
export AR = @AR@
export RM = @RM@
export CP = @CP@
export LN_S = @LN_S@
export MKDIR_P = @MKDIR_P@
export TAR = @TAR@
export YACC = @YACC@
export LEX = @LEX@
export SWIG = @SWIG@
prefix = @prefix@
exec_prefix = @exec_prefix@
CPPFLAGS = @CPPFLAGS@
CFLAGS += @CFLAGS@
PCCFLAGS += @CFLAGS@
#CFLAGS += -DREF_DEBUG
CXXFLAGS += @CXXFLAGS@
LDFLAGS = @LDFLAGS@
PCLDFLAGS = @LDFLAGS@
#
# I suppose this kind of interferes with standard libtool practice, but this
# is what I use to ensure my executables are linked statically against VMI
# libraries. If you want them to be dynamically linked, set this var empty.
#
LT_LDFLAGS = -static-libtool-libs
PYTHON_INCLUDE = @PYTHON_INCLUDE@
PYTHON_LIB = @PYTHON_LIB@
ENABLE_PYTHON = "@ENABLE_PYTHON@"
DESTDIR ?=
INSTALL_TOPDIR = $(DESTDIR)@prefix@
INSTALL_DIR = $(DESTDIR)@prefix@
INSTALL_LIBDIR = $(DESTDIR)@libdir@
INSTALL_INCDIR = $(DESTDIR)@incdir@
INSTALL_BINDIR = $(DESTDIR)@bindir@
INSTALL_SBINDIR = $(DESTDIR)@sbindir@
INSTALL_LIBEXECDIR = $(DESTDIR)@libexecdir@/vmi
INSTALL_ETCDIR = $(DESTDIR)@sysconfdir@
INSTALL_INCDIR = $(DESTDIR)@includedir@
INSTALL_RCDIR = $(DESTDIR)@INSTALL_RCDIR@
INSTALL_SHAREDIR= $(DESTDIR)@prefix@/share/vmi
INSTALL_PCDIR= $(DESTDIR)@prefix@/share/pkgconfig
PCCFLAGS += -I$(INSTALL_INCDIR)
PCLDFLAGS += -L$(INSTALL_LIBDIR)
#
# Any of these vars that we use in the code *must* be included in CFLAGS from
# this point if DESTDIR was defined. We would try to set them up in config.h,
# but configure doesn't know about DESTDIR, of course.
#
# So, NB: anytime you need one of these in the src, add it here!
#
#ifneq ($(DESTDIR),"")
CFLAGS += -DINSTALL_DIR=\"$(INSTALL_DIR)\" \
-DINSTALL_LIBEXECDIR=\"$(INSTALL_LIBEXECDIR)\" \
-DINSTALL_SHAREDIR=\"$(INSTALL_SHAREDIR)\"
#endif
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL@ -m 755
EXE = @EXEEXT@
INSTALL_DATA = @INSTALL@ -m 444
SUDO = @SUDO@
export SHELL = /bin/sh
ELFUTILS = @ELFUTILS@
ELFUTILS_CFLAGS = -I$(ELFUTILS)/include
ELFUTILS_LDFLAGS = -L$(ELFUTILS)/lib -L$(ELFUTILS)/lib/elfutils -ldw -lelf -lebl -ldl
PCCFLAGS += $(ELFUTILS_CFLAGS)
PCLDFLAGS += $(ELFUTILS_LDFLAGS)
# need this to pick up pkg-config files in wherever glib might be
GLIB = @GLIB@
PKG_CONFIG_PATH := @GLIB@/lib/pkgconfig
#export PKG_CONFIG_PATH
GLIB_CFLAGS = `PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags glib-2.0`
GLIB_LDFLAGS = `PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs glib-2.0`
PCCFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags glib-2.0)
PCLDFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs glib-2.0)
#
# XXX this stuff should be pkg-config'd or similar
#
XENACCESS_FLAGS = -D ENABLE_XEN
ifeq ("@ENABLE_XENACCESS_DEBUG@","1")
XENACCESS_FLAGS += -D XA_DEBUG
endif
ifeq ("@XC_HAVE_MAP_FOREIGN@","1")
XENACCESS_FLAGS += -D HAVE_MAP_FOREIGN
endif
XENACCESS_LIBDIR= $(OBJDIR)/xenaccess
XENACCESS_A = $(XENACCESS_LIBDIR)/libxenaccess.a
XENACCESS_SO = $(XENACCESS_LIBDIR)/libxenaccess.so
XENACCESS_INC = $(TOP_SRCDIR)/
ENABLE_XENACCESS = "@ENABLE_XENACCESS@"
ENABLE_LIBVMI = "@ENABLE_LIBVMI@"
LIBVMI = @LIBVMI@
LIBVMI_A = $(LIBVMI)/lib/libvmi.a
LIBVMI_SO = $(LIBVMI)/lib/libvmi.so
ENABLE_XENSUPPORT= "@ENABLE_XENSUPPORT@"
ENABLE_XENTTSUPPORT= "@ENABLE_XENTTSUPPORT@"
ENABLE_DISTORM = "@ENABLE_DISTORM@"
DISTORM = @DISTORM@
ENABLE_SOAP = "@ENABLE_SOAP@"
VMPROBES_FLAGS = -D VMPROBE_DEBUG -D VMPROBE_i386 -D VMPROBE_SIGNAL
#VMPROBES_FLAGS += -D VMPROBE_BENCHMARK
VMPROBES_LIBDIR = $(OBJDIR)/vmprobes
VMPROBES_A = $(VMPROBES_LIBDIR)/libvmprobes.a
VMPROBES_SO = $(VMPROBES_LIBDIR)/libvmprobes.so
VMPROBES_INC = $(TOP_SRCDIR)/
#
# Set these so we get lseek64 right, everywhere, without having to muck
# with header files too much.
#
PYCFLAGS := -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
#
# Make sure CONFIG_DETERMINISTIC_TIMETRAVEL goes everywhere, to minimize confusion.
#
ifeq ("@CONFIG_DETERMINISTIC_TIMETRAVEL@","1")
PYCFLAGS += -DCONFIG_DETERMINISTIC_TIMETRAVEL
endif
CFLAGS += $(PYCFLAGS)
PCCFLAGS += $(PYCFLAGS)
# Swig/python doesn't get warning flags.
CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-unused-function
#-Wswitch-default -Wswitch-enum -Wtrampolines -Wtraditional-conversion -Wdeclaration-after-statement -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wconversion -Wlogical-op -Wstrict-prototypes -Wold-style-definition -Wmissing-parameter-type -Wmissing-prototypes -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Winline
CFLAGS += -O2
ifeq ("@ENABLE_DEBUGINFO@","1")
CFLAGS += -g
endif
ifeq ("@ENABLE_PROFILING@","1")
CFLAGS += -pg
endif
ifeq ("@ENABLE_VMI_DEBUG@","1")
CFLAGS += -DVMI_DEBUG
PCCFLAGS += -DVMI_DEBUG
PYCFLAGS += -DVMI_DEBUG
endif
#
# Use Judy.
#
CFLAGS += -I@JUDY@/include
PCCFLAGS += -I@JUDY@/include
LDFLAGS += -L@JUDY@/lib -lJudy
#
# Maybe use libvirt.
#
ifeq ("@ENABLE_LIBVIRT@","1")
LDFLAGS += $(shell pkg-config --libs libvirt) -lvirt-qemu
endif
#
# Pick up pkg-config files in wherever gsoap might be
#
GSOAP = @GSOAP@
ENABLE_SOAP = @ENABLE_SOAP@
PKG_CONFIG_PATH := @GSOAP@/lib64/pkgconfig:@GSOAP@/lib/pkgconfig
#export PKG_CONFIG_PATH
GSOAP_CFLAGS = `PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags gsoap`
GSOAP_LDFLAGS = `PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs gsoap`
#
# Some things (Fedora) need this explicitly.
#
LDFLAGS += -ldl
PCLDFLAGS += -ldl