1 | |
---|
2 | from distutils.core import setup, Extension |
---|
3 | import os |
---|
4 | |
---|
5 | XEN_ROOT = "../.." |
---|
6 | |
---|
7 | extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] |
---|
8 | |
---|
9 | include_dirs = [ XEN_ROOT + "/tools/libxc", |
---|
10 | XEN_ROOT + "/tools/xenstore", |
---|
11 | ] |
---|
12 | |
---|
13 | library_dirs = [ XEN_ROOT + "/tools/libxc", |
---|
14 | XEN_ROOT + "/tools/xenstore", |
---|
15 | ] |
---|
16 | |
---|
17 | libraries = [ "xenctrl", "xenguest", "xenstore" ] |
---|
18 | |
---|
19 | xc = Extension("xc", |
---|
20 | extra_compile_args = extra_compile_args, |
---|
21 | include_dirs = include_dirs + [ "xen/lowlevel/xc" ], |
---|
22 | library_dirs = library_dirs, |
---|
23 | libraries = libraries, |
---|
24 | sources = [ "xen/lowlevel/xc/xc.c" ]) |
---|
25 | |
---|
26 | xs = Extension("xs", |
---|
27 | extra_compile_args = extra_compile_args, |
---|
28 | include_dirs = include_dirs + [ "xen/lowlevel/xs" ], |
---|
29 | library_dirs = library_dirs, |
---|
30 | libraries = libraries, |
---|
31 | sources = [ "xen/lowlevel/xs/xs.c" ]) |
---|
32 | |
---|
33 | scf = Extension("scf", |
---|
34 | extra_compile_args = extra_compile_args, |
---|
35 | include_dirs = include_dirs + [ "xen/lowlevel/scf" ], |
---|
36 | library_dirs = library_dirs, |
---|
37 | libraries = libraries, |
---|
38 | sources = [ "xen/lowlevel/scf/scf.c" ]) |
---|
39 | |
---|
40 | acm = Extension("acm", |
---|
41 | extra_compile_args = extra_compile_args, |
---|
42 | include_dirs = include_dirs + [ "xen/lowlevel/acm" ], |
---|
43 | library_dirs = library_dirs, |
---|
44 | libraries = libraries, |
---|
45 | sources = [ "xen/lowlevel/acm/acm.c" ]) |
---|
46 | |
---|
47 | ptsname = Extension("ptsname", |
---|
48 | extra_compile_args = extra_compile_args, |
---|
49 | include_dirs = include_dirs + [ "ptsname" ], |
---|
50 | library_dirs = library_dirs, |
---|
51 | libraries = libraries, |
---|
52 | sources = [ "ptsname/ptsname.c" ]) |
---|
53 | |
---|
54 | modules = [ xc, xs, acm, ptsname ] |
---|
55 | if os.uname()[0] == 'SunOS': |
---|
56 | modules.append(scf) |
---|
57 | |
---|
58 | setup(name = 'xen', |
---|
59 | version = '3.0', |
---|
60 | description = 'Xen', |
---|
61 | packages = ['xen', |
---|
62 | 'xen.lowlevel', |
---|
63 | 'xen.util', |
---|
64 | 'xen.xend', |
---|
65 | 'xen.xend.server', |
---|
66 | 'xen.xend.xenstore', |
---|
67 | 'xen.xm', |
---|
68 | 'xen.web', |
---|
69 | 'xen.sv', |
---|
70 | |
---|
71 | 'xen.xend.tests', |
---|
72 | 'xen.xend.server.tests', |
---|
73 | 'xen.xend.xenstore.tests', |
---|
74 | 'xen.xm.tests' |
---|
75 | ], |
---|
76 | ext_package = "xen.lowlevel", |
---|
77 | ext_modules = modules |
---|
78 | ) |
---|
79 | |
---|
80 | os.chdir('logging') |
---|
81 | execfile('setup.py') |
---|