1
2from distutils.core import setup, Extension
3import os, sys
4
5XEN_ROOT = "../.."
6
7extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
8
9PATH_XEN      = XEN_ROOT + "/tools/include"
10PATH_LIBXENTOOLLOG = XEN_ROOT + "/tools/libs/toollog"
11PATH_LIBXENEVTCHN = XEN_ROOT + "/tools/libs/evtchn"
12PATH_LIBXC    = XEN_ROOT + "/tools/libxc"
13PATH_LIBXL    = XEN_ROOT + "/tools/libxl"
14PATH_XENSTORE = XEN_ROOT + "/tools/xenstore"
15
16xc = Extension("xc",
17               extra_compile_args = extra_compile_args,
18               include_dirs       = [ PATH_XEN,
19                                      PATH_LIBXENTOOLLOG + "/include",
20                                      PATH_LIBXENEVTCHN + "/include",
21                                      PATH_LIBXC + "/include",
22                                      "xen/lowlevel/xc" ],
23               library_dirs       = [ PATH_LIBXC ],
24               libraries          = [ "xenctrl", "xenguest" ],
25               depends            = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so" ],
26               extra_link_args    = [ "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ],
27               sources            = [ "xen/lowlevel/xc/xc.c" ])
28
29xs = Extension("xs",
30               extra_compile_args = extra_compile_args,
31               include_dirs       = [ PATH_XEN, PATH_XENSTORE + "/include", "xen/lowlevel/xs" ],
32               library_dirs       = [ PATH_XENSTORE ],
33               libraries          = [ "xenstore" ],
34               depends            = [ PATH_XENSTORE + "/libxenstore.so" ],
35               sources            = [ "xen/lowlevel/xs/xs.c" ])
36
37plat = os.uname()[0]
38modules = [ xc, xs ]
39
40setup(name            = 'xen',
41      version         = '3.0',
42      description     = 'Xen',
43      packages        = ['xen',
44                         'xen.migration',
45                         'xen.lowlevel',
46                        ],
47      ext_package = "xen.lowlevel",
48      ext_modules = modules
49      )
50