Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 182 lines (145 sloc) 5.085 kb
a1d6d4b @rokstrnisa Changed 'getenv PWD' to 'shell pwd'.
rokstrnisa authored
1 SCRIPTS=$(shell pwd)/scripts
0afeac0 @rokstrnisa Created the install script, and made use of it.
rokstrnisa authored
2 IPROG=$(SCRIPTS)/install.sh 755
3 IDATA=$(SCRIPTS)/install.sh 644
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
4
5 XEN_COMPILE_ARCH = $(shell uname -m | sed -e"s/i.86/x86_32/g")
6
7 if $(equal $(XEN_COMPILE_ARCH), x86_32)
8 LIBDIR = lib
9 export
10 else
11 LIBDIR = lib64
12 export
13
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
14 # By default compile to native code but not byte code unless specified otherwise
15 NATIVE_ENABLED=$(getenv COMPILE_NATIVE, true)
16 BYTE_ENABLED=$(getenv COMPILE_BYTE, false)
17 if $(not $(or $(NATIVE_ENABLED), $(BYTE_ENABLED)))
18 eprintln(At least one of native and bytecode compilation modes should be enabled)
19 exit(1)
20 export
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
21
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
22 CARBON_DISTFILES=$(getenv CARBON_DISTFILES, /usr/groups/linux/distfiles)
23 export
6441da6 commit 7fe79c6b8ac57a6cfa0c101f76bc7de2faca0531
Vincent Hanquez authored
24
25349ba commit 7fe79c6b8ac57a6cfa0c101f76bc7de2faca0531
Vincent Hanquez authored
25 OCAMLDEP_MODULES_ENABLED = false
26
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
27 USE_OCAMLFIND = true
28
7f43852 @djs55 By default warnings are now treated as errors in the ocaml code.
djs55 authored
29 OCAMLFLAGS = -g -dtypes -thread -warn-error +a-4-6-9-27-28-29
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
30
31 # c compiling stuff
32 OCAMLCFLAGS += -g
33 OCAMLOPTFLAGS = -ccopt -fPIC
34 CFLAGS+=-g -O2
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
35 if $(NATIVE_ENABLED)
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
36 CFLAGS+=-DCOMPILE_NATIVE
37 export
38
39 LDFLAGS+=-static
40
41 if $(not $(defined-env XEN_ROOT))
42 XEN_ROOT =
43 export
44
45 XEN_CFLAGS=-I$(XEN_ROOT)/usr/include
46 XEN_OCAML_LINK_FLAGS=-cclib -L$(XEN_ROOT)/usr/$(LIBDIR)
47 XEN_OCAML_CLIBS=
48
49 # For the Zurich chroot environment
50 CFLAGS+=-I$(shell ocamlc -where)
51
cb2e52b @djs55 OMakefiles now respect DESTDIR, for simpler packaging.
djs55 authored
52 DESTDIR=$(getenv DESTDIR, $(ROOT)/dist/staging)
e696eb8 @rokstrnisa Added auto-generated config_constants.ml, and made use of it.
rokstrnisa authored
53 RAW_BASE_PATH=$(shell scripts/base-path scripts/xapi.conf)
54 BASE_PATH=$(DESTDIR)$(RAW_BASE_PATH)
55 BIN_DIR=$(RAW_BASE_PATH)/bin
56 BIN_PATH=$(DESTDIR)$(BIN_DIR)
57 DEBUGDIST=$(BASE_PATH)/debug
58 LIBEXEC=$(BASE_PATH)/libexec
cb2e52b @djs55 OMakefiles now respect DESTDIR, for simpler packaging.
djs55 authored
59
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
60 DIST=$(ROOT)/dist
cb2e52b @djs55 OMakefiles now respect DESTDIR, for simpler packaging.
djs55 authored
61 SDK=$(DESTDIR)/usr/share/doc/xapi
62 SDKWWW=$(DESTDIR)/usr/share/doc/xapi/www
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
63
64 CLEAN_OBJS = *.cmi *.cmo *.cmx *.cma *.cmxa *.annot *.run *.opt *.o *.a
65 export CLEAN_OBJS
66
bfcc539 @robhoes New ocamldoc generator and infrastructure
robhoes authored
67 #.PHONY: clean
68 #clean:
69 # rm -rf doc/
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
70
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
71 COMPILE_OCAML=$(getenv COMPILE_OCAML, yes)
72 COMPILE_JS=$(getenv COMPILE_JS, yes)
13c9483 @djs55 Don't perform "install" actions in a "build" step.
djs55 authored
73 COMPILE_JAVA=$(getenv COMPILE_JAVA, no)
66f6008 @djs55 Move defaults for environment variables PRODUCT_VERSION, PRODUCT_BRAND, ...
djs55 authored
74
75 PRODUCT_VERSION=$(getenv PRODUCT_VERSION, unknown)
76 PRODUCT_BRAND=$(getenv PRODUCT_BRAND, unknown)
77 BUILD_NUMBER=$(getenv BUILD_NUMBER, -1)
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
78 export
1bdde10 @zli Fix a few Makefile issues on compiling XAPI client without Xen stuff
zli authored
79
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
80 .SUBDIRS: ocaml scripts $(if $(COMPILE_JAVA), java) $(if $(COMPILE_JS), javascript)
aaea6dd @zli Fix a few Makefile issues on compiling XAPI client without Xen stuff
zli authored
81
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
82 export
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
83
84 .PHONY: none
85
86 # Ocaml #############################################################################
e696eb8 @rokstrnisa Added auto-generated config_constants.ml, and made use of it.
rokstrnisa authored
87 OCAML_PHASE1= generate_constants autogen_idl
640788c @rokstrnisa Removes the need for the rebuild script.
rokstrnisa authored
88 OCAML_PHASE2= $(if $(BYTE_ENABLED), ocaml/idl/ocaml_backend/xapi_client.cma) $(if $(NATIVE_ENABLED), ocaml/idl/ocaml_backend/xapi_client.cmxa)
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
89
90 # JS ################################################################################
91 JS_PHASE1=
92 JS_PHASE2=js_binding
93 JS_PHASE3=
94
f320194 Initial import of Java XenAPI console viewer from http://community.citri...
David Scott authored
95 # Java ##############################################################################
96 JAVA_PHASE1= XenServerConsole.jar
97 JAVA_PHASE2=
98 JAVA_PHASE3=
99
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
100 JS_PHASE1_TARGETS = $(if $(COMPILE_JS), $(JS_PHASE1))
101 JS_PHASE2_TARGETS = $(if $(COMPILE_JS), $(JS_PHASE2))
102 JS_PHASE3_TARGETS = $(if $(COMPILE_JS), $(JS_PHASE3))
b79ae86 Initial import of Java XenAPI console viewer from http://community.citri...
David Scott authored
103
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
104 JAVA_PHASE1_TARGETS = $(if $(COMPILE_JAVA), $(JAVA_PHASE1))
105 JAVA_PHASE2_TARGETS = $(if $(COMPILE_JAVA), $(JAVA_PHASE2))
106 JAVA_PHASE3_TARGETS = $(if $(COMPILE_JAVA), $(JAVA_PHASE3))
f320194 Initial import of Java XenAPI console viewer from http://community.citri...
David Scott authored
107
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
108 # Phase 3 targets divided into two depending on whether we're building the Xen stuff or not:
109 OCAML_PHASE3_XEN = \
110 ocaml/xapi/xapi \
5e9f614 @djs55 Add a unit test for the database upgrade_vm_records logic.
djs55 authored
111 ocaml/xapi/xapi_unit_test \
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
112 ocaml/xstest/xstest \
113 ocaml/xstest/xsbench \
114 ocaml/xstest/xscheckperms \
115 allxenops \
116 ocaml/xenguest/xenguest \
117 ocaml/xenguest/dumpcore \
31642ba @zli Place xenctrl injection lib at the same place as XAPI/XIU server
zli authored
118 ocaml/xiu/libxenctrl_xiu.so \
aaea6dd @zli Fix a few Makefile issues on compiling XAPI client without Xen stuff
zli authored
119 ocaml/xiu/xiu \
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
120 ocaml/xapi/fakeguestagent \
aaea6dd @zli Fix a few Makefile issues on compiling XAPI client without Xen stuff
zli authored
121 ocaml/xapi/quicktestbin \
4ec3e6c @djs55 Add a sparse_dd binary which uses the new sparseness scanning code.
djs55 authored
122 ocaml/xapi/sparse_dd \
692006c @jonludlam Add the ability for xapi to generate fake data for the RRDs. Useful when...
jonludlam authored
123 ocaml/xapi/monitor_fake_plugin \
180ab35 @djs55 Fix build since v6testd has been renamed v6d
djs55 authored
124 ocaml/license/v6d \
11655d8 @robhoes [licensing] Move all license-related code to ocaml/v6
robhoes authored
125 ocaml/license/v6d-reopen-logs
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
126
127 OCAML_PHASE3_NOXEN = \
77f8ed7 [CA-43971]: Adding the tool to generate the pool secret, including
Magnus Therning authored
128 ocaml/ptoken/genptoken \
0978888 @johnelse Turn on build of local authentication test.
johnelse authored
129 ocaml/auth/testauth \
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
130 ocaml/auth/testauthx \
131 ocaml/xe-cli/xe \
521e6ba @djs55 Add 'sm' CLI for debugging and testing SM backends.
djs55 authored
132 ocaml/sm-cli/sm \
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
133 ocaml/xsh/xsh \
134 ocaml/xe-cli/rt/test_host \
135 ocaml/xe-cli/rt/gtclient \
136 ocaml/xe-cli/rt/gtserver_linux \
137 ocaml/xe-cli/rt/xgetip \
138 ocaml/xe-cli/rt/geneva/cli_test \
139 ocaml/xe-cli/rt/geneva/sm_stress \
140 ocaml/events/event_listen \
141 ocaml/console/console \
142 ocaml/graph/graph \
143 ocaml/rfb/rfb_randomtest \
144 ocaml/database/unit_test_marshall \
145 ocaml/database/block_device_io \
146 ocaml/toplevel \
147 ocaml/cdrommon/cdrommon \
148 ocaml/xapi/binpack \
149 ocaml/idl/datamodel \
150 ocaml/db_process/xapi-db-process \
151 ocaml/vncproxy/vncproxy \
06ed151 CA-30365: Add rrddump to the build and include it in /opt/xensource/debu...
David Scott authored
152 ocaml/xapi/rrddump \
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
153 ocaml/perftest/perftest \
154 ocaml/perftest/histogram \
155 ocaml/perftest/cumulative_time \
156 ocaml/lvhdrt/lvhdrt \
157 ocaml/mpathalert/mpathalert \
158 ocaml/multipathrt/multipathrt
159
160
1e04a1b @djs55 Remove the COMPILE_XENSTUFF environment variable from the Makefile/OMake...
djs55 authored
161 OCAML_PHASE3 = $(OCAML_PHASE3_XEN) $(OCAML_PHASE3_NOXEN)
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
162
09d436b @zli Enable native/bytecode compilation choices, and some Makefile simplifica...
zli authored
163 OCAML_PHASE1_TARGETS = $(if $(COMPILE_OCAML), $(OCAML_PHASE1))
164 OCAML_PHASE2_TARGETS = $(if $(COMPILE_OCAML), $(OCAML_PHASE2))
165 OCAML_PHASE3_TARGETS = $(if $(COMPILE_OCAML), $(OCAML_PHASE3))
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
166
167 #####################################################################################
168
169 # phase1: build stdlib2
170 .PHONY: phase1
f320194 Initial import of Java XenAPI console viewer from http://community.citri...
David Scott authored
171 phase1: $(OCAML_PHASE1_TARGETS) $(JS_PHASE1_TARGETS) $(JAVA_PHASE1_TARGETS)
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
172 mkdir -p $(DIST) $(DIST)/bin
173
174 # phase2: build compilers and make autogenerated files
175 .PHONY: phase2
f320194 Initial import of Java XenAPI console viewer from http://community.citri...
David Scott authored
176 phase2: $(OCAML_PHASE2_TARGETS) $(JS_PHASE2_TARGETS) $(JAVA_PHASE2_TARGETS)
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
177
178 # phase3: use autogenerated files to make apps
179 .PHONY: phase3
f320194 Initial import of Java XenAPI console viewer from http://community.citri...
David Scott authored
180 phase3: $(OCAML_PHASE3_TARGETS) $(JS_PHASE3_TARGETS) $(JAVA_PHASE3_TARGETS)
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
181
Something went wrong with that request. Please try again.