1 mike 1.1 ################################################################################
2 ##
3 ## Get external environment variables. Note that all external environment
4 ## variables begin with "PEGASUS_".
5 ##
6 ################################################################################
7
|
8 konrad.r 1.55 ifndef ROOT
9 ROOT = $(subst \,/,$(PEGASUS_ROOT))
10 endif
11
|
12 denise.eckstein 1.61 ifdef PEGASUS_ENVVAR_FILE
|
13 david.dillard 1.65 include $(PEGASUS_ENVVAR_FILE)
|
14 denise.eckstein 1.61 else
|
15 david.dillard 1.65 include $(ROOT)/env_var.status
|
16 denise.eckstein 1.61 endif
|
17 konrad.r 1.55
|
18 mike 1.2 ifdef PEGASUS_HOME
|
19 david.dillard 1.65 HOME_DIR = $(subst \,/,$(PEGASUS_HOME))
|
20 mike 1.1 else
|
21 david.dillard 1.65 $(error PEGASUS_HOME environment variable undefined)
|
22 mike 1.1 endif
23
|
24 karl 1.18 ifdef PEGASUS_ROOT
25 ROOT = $(subst \,/,$(PEGASUS_ROOT))
26 else
|
27 david.dillard 1.65 $(error PEGASUS_ROOT environment variable undefined)
|
28 karl 1.18 endif
29
|
30 chuck 1.35 # l10n
31 ifdef ICU_ROOT
32 ICUROOT = $(subst \,/,$(ICU_ROOT))
33 endif
34
|
35 kumpf 1.21 ifdef PEGASUS_TMP
|
36 david.dillard 1.65 TMP_DIR = $(subst \,/,$(PEGASUS_TMP))
|
37 kumpf 1.21 else
|
38 david.dillard 1.65 TMP_DIR = .
|
39 kumpf 1.21 endif
40
|
41 kumpf 1.26 ifdef PEGASUS_DISPLAYCONSUMER_DIR
|
42 david.dillard 1.65 DISPLAYCONSUMER_DIR = $(subst \,/,$(PEGASUS_DISPLAYCONSUMER_DIR))
|
43 kumpf 1.26 else
|
44 david.dillard 1.65 DISPLAYCONSUMER_DIR = $(subst \,/,$(PEGASUS_HOME))
|
45 kumpf 1.26 endif
46
|
47 david.dillard 1.66 PLATFORM_FILES=$(wildcard $(ROOT)/mak/platform*.mak)
|
48 karl 1.78 PLATFORM_TEMP=$(subst $(ROOT)/mak/platform_,, $(PLATFORM_FILES))
49 VALID_PLATFORMS=$(subst .mak,, $(PLATFORM_TEMP))
|
50 mike 1.8
51 ifndef PEGASUS_PLATFORM
|
52 david.dillard 1.66 $(error PEGASUS_PLATFORM environment variable undefined. Please set to\
53 one of the following:$(VALID_PLATFORMS))
|
54 mike 1.8 endif
55
|
56 mike 1.1 ################################################################################
57
|
58 kumpf 1.22 OBJ_DIR = $(HOME_DIR)/obj/$(DIR)
59 BIN_DIR = $(HOME_DIR)/bin
60 LIB_DIR = $(HOME_DIR)/lib
|
61 chuck 1.35
62 # l10n
63 # define the location for the compiled messages
64 MSG_ROOT = $(HOME_DIR)/msg
|
65 kumpf 1.22
|
66 jim.wunderlich 1.90 #############################################################################
67 ## The following REPOSITORY_XXX variables are only used within the
68 ## makefiles for building the repository (cimmofl) and running the tests.
69 ## They have no effect on CIMconfig initial startup configuration.
70
71 #
|
72 kumpf 1.22 # define the location for the repository
|
73 jim.wunderlich 1.90 #
74 # NOTE: There is another variable efined in many of the test makefiles
75 # called REPOSITORYDIR. It is a local variable in each of those Makefiles
76 # to localally control where the temporay small repository they
77 # build, use and then delete is located. Most of the time it is set to TMP_DIR.
78 #
79 ifndef REPOSITORY_DIR
|
80 kumpf 1.22 REPOSITORY_DIR = $(HOME_DIR)
|
81 jim.wunderlich 1.90 endif
82
83 #
84 # WARNING: The REPOSITORY_NAME varible is not used by all the test,
85 # many of them are still hardcoded to "repository". What this means
86 # is that you can change the repository name and build it. But you
87 # cannot run the test without many of them failing
88 #
89 ifndef REPOSITORY_NAME
|
90 jim.wunderlich 1.81 REPOSITORY_NAME = repository
|
91 jim.wunderlich 1.90 endif
92
|
93 jim.wunderlich 1.81 REPOSITORY_ROOT = $(REPOSITORY_DIR)/$(REPOSITORY_NAME)
94
95 # define the repository mode
|
96 h.sterling 1.89 # XML = XML format
97 # BIN = Binary format
|
98 jim.wunderlich 1.81 #
|
99 jim.wunderlich 1.90 ifndef REPOSITORY_MODE
|
100 jim.wunderlich 1.81 REPOSITORY_MODE = XML
|
101 jim.wunderlich 1.90 endif
102
103 ###########################################################################
|
104 mike 1.1
|
105 kumpf 1.23 # The two variables, CIM_SCHEMA_DIR and CIM_SCHEMA_VER,
|
106 chip 1.76 # are used to control the version of the CIM Schema
|
107 kumpf 1.23 # loaded into the Pegasus Internal, InterOp,
108 # root/cimv2 and various test namespaces.
109 #
|
110 chip 1.76 # Update the following two environment variables to
|
111 kumpf 1.23 # change the version.
112
|
113 kumpf 1.37 # The environment variable PEGASUS_CIM_SCHEMA can be used
|
114 chip 1.76 # to change the values of CIM_SCHEMA_DIR, CIM_SCHEMA_VER
|
115 kumpf 1.37 # and ALLOW_EXPERIMENTAL.
116 #
117 # To use the PEGASUS_CIM_SCHEMA variable the Schema mof
118 # files must be placed in the directory
119 # $(PEGAUS_ROOT)/Schemas/$(PEGASUS_CIM_SCHEMA)
|
120 chip 1.76 #
|
121 kumpf 1.37 # The value of PEGASUS_CIM_SCHEMA must conform to the
122 # following syntax:
123 #
124 # CIM[Prelim]<CIM_SCHEMA_VER>
125 #
|
126 chip 1.76 # The string "Prelim" should be included if the
|
127 kumpf 1.37 # Schema contains "Experimental" class definitions.
128 #
129 # The value of <CIM_SCHEMA_VER> must be the value
|
130 chip 1.76 # of the version string included by the DMTF as
131 # part of the mof file names (e.g, CIM_Core27.mof).
|
132 kumpf 1.37 # Therefore, for example, the value of <CIM_SCHEMA_VER>
133 # for CIM27 Schema directories MUST be 27.
134 #
|
135 chip 1.76 # Examples of valid values of PEGASUS_CIM_SCHEMA
|
136 kumpf 1.37 # include CIMPrelim27, CIM27, CIMPrelim28, and CIM28.
137 #
138 # Note the CIMPrelim271 would NOT be a valid value
139 # for PEGASUS_CIM_SCHEMA because the version string
140 # portion of the mof files (e.g., CIM_Core27.mof) in
141 # the CIMPrelimin271 directory is 27 not 271.
|
142 kumpf 1.23
|
143 gerarda 1.29 # ***** CIM_SCHEMA_DIR INFO ****
144 # If CIM_SCHEMA_DIR changes to use a preliminary schema which
145 # has experimentals make sure and change the path below to appopriate
146 # directory path. Example: CIMPrelim271 is preliminary and has
147 # experimental classes. Since experimental classes exist the -aE
148 # option of the mof compiler needs to be set.
149 # *****
|
150 kumpf 1.37
151 ifdef PEGASUS_CIM_SCHEMA
|
152 david.dillard 1.65 CIM_SCHEMA_DIR=$(PEGASUS_ROOT)/Schemas/$(PEGASUS_CIM_SCHEMA)
|
153 chip 1.76 ifeq ($(findstring $(patsubst CIM%,%,$(patsubst CIMPrelim%,%,$(PEGASUS_CIM_SCHEMA))),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 271 28),)
|
154 david.dillard 1.65 CIM_SCHEMA_VER=
155 else
156 CIM_SCHEMA_VER=$(patsubst CIM%,%,$(patsubst CIMPrelim%,%,$(PEGASUS_CIM_SCHEMA)))
157 endif
|
158 kumpf 1.37 else
|
159 a.dunfey 1.82 CIM_SCHEMA_DIR=$(PEGASUS_ROOT)/Schemas/CIM29
160 CIM_SCHEMA_VER=
|
161 kumpf 1.37 endif
162
163 ifneq (, $(findstring Prelim, $(CIM_SCHEMA_DIR)))
|
164 david.dillard 1.65 ALLOW_EXPERIMENTAL = -aE
|
165 gerarda 1.29 else
|
166 david.dillard 1.65 ALLOW_EXPERIMENTAL =
|
167 gerarda 1.29 endif
168
|
169 bob 1.5 LEX = flex
170
|
171 jim.wunderlich 1.86 ## ========================================================================
172 ## DIFFSORT function definition
173 ## Here is an example using the DIFFSORT function:
174 ##
175 ## difftest: FORCE
|
176 h.sterling 1.89 ## @ test > result
|
177 jim.wunderlich 1.86 ## @ $(call DIFFSORT,result,standard_result)
|
178 h.sterling 1.89 ## @ $(ECHO) +++++ all test passed
|
179 jim.wunderlich 1.86 ##
180
181 define NL
182
183
184 endef
185
186 DIFFSORT = $(SORT) $(1) > $(1).tmp $(NL) \
187 $(SORT) $(2) > $(2).tmp $(NL) \
188 $(DIFF) $(1).tmp $(2).tmp $(NL) \
189 $(RM) -f $(1).tmp $(NL) \
190 $(RM) -f $(2).tmp $(NL)
191
192
|
193 mike 1.8 ################################################################################
194 ##
195 ## Attempt to include a platform configuration file:
196 ##
197 ################################################################################
198
|
199 david.dillard 1.66 PLATFORM_FILE = $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
200 ifneq ($(wildcard $(PLATFORM_FILE)), )
201 include $(PLATFORM_FILE)
202 else
|
203 david.dillard 1.65 $(error PEGASUS_PLATFORM environment variable must be set to one of\
|
204 david.dillard 1.66 the following:$(VALID_PLATFORMS))
|
205 mike 1.8 endif
|
206 karl 1.17
|
207 karl 1.36 ################################################################################
208 ##
209 ## Set up any platform independent compile conditionals by adding them to
210 ## precreated FLAGS parameter.
|
211 chip 1.76 ## Assumes that the basic flags have been setup in FLAGS.
|
212 karl 1.36 ## Assumes that compile time flags are controlled with -D CLI option.
213 ##
214 ################################################################################
|
215 karl 1.17
|
216 karl 1.36 # Setup the conditional compile for client displays.
|
217 chip 1.76 #
|
218 karl 1.36 ifdef PEGASUS_CLIENT_TRACE_ENABLE
|
219 david.dillard 1.65 DEFINES += -DPEGASUS_CLIENT_TRACE_ENABLE
|
220 karl 1.36 endif
221
|
222 kumpf 1.87 # Allow PEGASUS_ASSERT statements to be disabled.
223 ifdef PEGASUS_NOASSERTS
224 DEFINES += -DNDEBUG
225 endif
226
|
227 mday 1.40 # do not compile trace code. sometimes it causes problems debugging
228 ifdef PEGASUS_REMOVE_TRACE
|
229 david.dillard 1.65 DEFINES += -DPEGASUS_REMOVE_TRACE
|
230 mday 1.40 endif
231
|
232 chuck 1.47 # PEP 161
233 # Control whether utf-8 filenames are supported by the repository
234 ifdef PEGASUS_SUPPORT_UTF8_FILENAME
|
235 david.dillard 1.65 DEFINES += -DPEGASUS_SUPPORT_UTF8_FILENAME
|
236 chuck 1.47
|
237 david.dillard 1.65 # Control whether utf-8 filenames in the repository are escaped
238 ifdef PEGASUS_REPOSITORY_ESCAPE_UTF8
239 DEFINES += -DPEGASUS_REPOSITORY_ESCAPE_UTF8
240 endif
|
241 chuck 1.47 endif
242
|
243 kumpf 1.49 #
244 # PEP 142
245 # The following flag need to be set to enable
246 # user group authorization functionality.
247 #
248 ifdef PEGASUS_ENABLE_USERGROUP_AUTHORIZATION
|
249 david.dillard 1.65 DEFINES += -DPEGASUS_ENABLE_USERGROUP_AUTHORIZATION
|
250 kumpf 1.49 endif
251
|
252 chuck 1.67 #
253 # PEP 193
254 # The following flag need to be set to disable
255 # CQL in indication subscriptions
256 #
257 ifdef PEGASUS_DISABLE_CQL
258 DEFINES += -DPEGASUS_DISABLE_CQL
259 endif
260
|
261 kumpf 1.68 #
262 # PEP 186
263 # Allow override of product name/version/status. A file
264 # pegasus/src/Pegasus/Common/ProductVersion.h must exist when this
265 # flag is defined.
266 #
267 ifdef PEGASUS_OVERRIDE_PRODUCT_ID
268 DEFINES += -DPEGASUS_OVERRIDE_PRODUCT_ID
269 endif
270
|
271 kumpf 1.71 #
272 # PEP 197
273 # Allow the Provider User Context feature to be disabled.
274 #
|
275 kumpf 1.74 ifdef PEGASUS_DISABLE_PROV_USERCTXT
|
276 kumpf 1.71 DEFINES += -DPEGASUS_DISABLE_PROV_USERCTXT
|
277 kumpf 1.74 else
278 ifdef PEGASUS_DISABLE_PROV_USERCTXT_REQUESTOR
279 DEFINES += -DPEGASUS_DISABLE_PROV_USERCTXT_REQUESTOR
280 endif
281 ifdef PEGASUS_DISABLE_PROV_USERCTXT_DESIGNATED
282 DEFINES += -DPEGASUS_DISABLE_PROV_USERCTXT_DESIGNATED
283 endif
284 ifdef PEGASUS_DISABLE_PROV_USERCTXT_PRIVILEGED
285 DEFINES += -DPEGASUS_DISABLE_PROV_USERCTXT_PRIVILEGED
286 endif
287 ifdef PEGASUS_DISABLE_PROV_USERCTXT_CIMSERVER
288 DEFINES += -DPEGASUS_DISABLE_PROV_USERCTXT_CIMSERVER
289 endif
290 endif
|
291 kumpf 1.71
|
292 h.sterling 1.89 # Bug 2147
293 # Allow local domain socket usage to be disabled.
294 ifdef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
295 DEFINES += -DPEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
296 endif
297
|
298 chip 1.76 # PEP 211
299 # Controls object normalization support.
300 ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION
301 DEFINES += -DPEGASUS_ENABLE_OBJECT_NORMALIZATION
302 endif
303
|
304 kumpf 1.80 # Allow ExecQuery functionality to be enabled
305 ifndef PEGASUS_ENABLE_EXECQUERY
306 DEFINES += -DPEGASUS_DISABLE_EXECQUERY
307 endif
308
|
309 yi.zhou 1.85 # Allow System Log Handler to be enabled
310 ifdef PEGASUS_ENABLE_SYSTEM_LOG_HANDLER
311 DEFINES += -DPEGASUS_ENABLE_SYSTEM_LOG_HANDLER
312 endif
313
314 # Allow Email Handler to be enabled
315 ifdef PEGASUS_ENABLE_EMAIL_HANDLER
316 DEFINES += -DPEGASUS_ENABLE_EMAIL_HANDLER
317 endif
|
318 kumpf 1.49
|
319 karl 1.39 # setup function to enable SLP functions in the Pegasus standard compile
|
320 karl 1.75 # Set the environment varaible PEGASUS_ENABLE_SLP to enable SLP code.
321 # NOTE. Effective with Bug # 2633 some platforms now enable SLP.
322 # To see which platforms look for platform make files that set
|
323 chip 1.76 # the variable PEGASUS_ENABLE_SLP
|
324 karl 1.39 ifdef PEGASUS_ENABLE_SLP
|
325 david.dillard 1.65 DEFINES += -DPEGASUS_ENABLE_SLP
|
326 karl 1.39 endif
|
327 karl 1.36
|
328 karl 1.60 # set PEGASUS_DEBUG into the DEFINES if it exists.
329 # Note that this flag is the general separator between
330 # debug compiles and non-debug compiles and controls both
331 # the use of any debug options on compilers and linkers
332 # and general debug support that we want to be turned on in
|
333 chip 1.76 # debug mode.
|
334 karl 1.60 ifdef PEGASUS_DEBUG
|
335 david.dillard 1.65 DEFINES += -DPEGASUS_DEBUG
|
336 kumpf 1.88
337 # Indications debugging options
338 ifdef PEGASUS_INDICATION_PERFINST
339 DEFINES += -DPEGASUS_INDICATION_PERFINST
340 endif
341
342 ifdef PEGASUS_INDICATION_HASHTRACE
343 DEFINES += -DPEGASUS_INDICATION_HASHTRACE
344 endif
|
345 karl 1.60 endif
346
|
347 chuck 1.42 # compile in the experimental APIs
|
348 david.dillard 1.65 DEFINES += -DPEGASUS_USE_EXPERIMENTAL_INTERFACES
|
349 chuck 1.42
|
350 w.white 1.57 # Set compile flag to control compilation of CIMOM statistics
|
351 karl 1.73 ifdef PEGASUS_DISABLE_PERFINST
352 FLAGS += -DPEGASUS_DISABLE_PERFINST
|
353 w.white 1.57 endif
|
354 kumpf 1.56
355 ############################################################
356 #
357 # Set any vendor-specific compile flags
358 #
359 ############################################################
360
361 ifdef PEGASUS_VENDOR_HP
|
362 david.dillard 1.65 DEFINES+= -DPEGASUS_VENDOR_HP
|
363 kumpf 1.56 endif
364
|
365 chip 1.76
|
366 karl 1.17 ############################################################
367 #
368 # Set up other Make Variables that depend on platform config files
369 #
370 ############################################################
371
372 # This is temporary until we end up with a better place to
373 # put this variable
374 # Makefiles can do directory remove with
375 # $(RMREPOSITORY) repositoryname
376 #
377 RMREPOSITORY = $(RMDIRHIER)
378
|
379 w.otsuka 1.63 ifdef PEGASUS_USE_RELEASE_CONFIG_OPTIONS
|
380 david.dillard 1.65 FLAGS += -DPEGASUS_USE_RELEASE_CONFIG_OPTIONS
|
381 w.otsuka 1.62 endif
382
383 ifdef PEGASUS_USE_RELEASE_DIRS
|
384 david.dillard 1.65 FLAGS += -DPEGASUS_USE_RELEASE_DIRS
|
385 w.otsuka 1.62 endif
|
386 mday 1.27
|
387 kumpf 1.64 # Unless otherwise specified, Pegasus libraries go in $(PEGASUS_HOME)/lib
388 ifndef PEGASUS_DEST_LIB_DIR
|
389 david.dillard 1.65 PEGASUS_DEST_LIB_DIR = lib
|
390 kumpf 1.64 endif
|
391 mday 1.28
|
392 gs.keenan 1.77 ifeq ($(OS),VMS)
393 DEFINES += -DPEGASUS_DEST_LIB_DIR="""$(PEGASUS_DEST_LIB_DIR)"""
394 else
395 DEFINES += -DPEGASUS_DEST_LIB_DIR=\"$(PEGASUS_DEST_LIB_DIR)\"
396 endif
397
|
398 w.otsuka 1.79 ################################################################################
399 ##
400 ## Additional build flags passed in through environment variables.
401 ## These flags are added to the compile/link commands.
402 ##
403 ################################################################################
404
405 ifdef PEGASUS_EXTRA_CXX_FLAGS
406 EXTRA_CXX_FLAGS = $(PEGASUS_EXTRA_CXX_FLAGS)
407 endif
408
409 ifdef PEGASUS_EXTRA_C_FLAGS
410 EXTRA_C_FLAGS = $(PEGASUS_EXTRA_C_FLAGS)
411 endif
412
413 ifdef PEGASUS_EXTRA_LINK_FLAGS
414 EXTRA_LINK_FLAGS = $(PEGASUS_EXTRA_LINK_FLAGS)
415 endif
416
|