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 include $(PEGASUS_ENVVAR_FILE)
14 else
15 include $(ROOT)/env_var.status
16 endif
|
17 konrad.r 1.55
|
18 mike 1.2 ifdef PEGASUS_HOME
19 HOME_DIR = $(subst \,/,$(PEGASUS_HOME))
|
20 mike 1.1 else
|
21 mike 1.2 ERROR = pegasus_home_undefined
22 pegasus_home_undefined:
|
23 mike 1.4 @ echo PEGASUS_HOME environment variable undefined
|
24 mike 1.2 @ exit 1
|
25 mike 1.1 endif
26
|
27 karl 1.18 ifdef PEGASUS_ROOT
28 ROOT = $(subst \,/,$(PEGASUS_ROOT))
29 else
30 ERROR = pegasus_root_undefined
31 pegasus_root_undefined:
32 @ echo PEGASUS_ROOT environment variable undefined
33 @ exit 1
34 endif
35
|
36 chuck 1.35 # l10n
37 ifdef ICU_ROOT
38 ICUROOT = $(subst \,/,$(ICU_ROOT))
39 endif
40
|
41 kumpf 1.21 ifdef PEGASUS_TMP
42 TMP_DIR = $(subst \,/,$(PEGASUS_TMP))
43 else
44 TMP_DIR = .
45 endif
46
|
47 kumpf 1.26 ifdef PEGASUS_DISPLAYCONSUMER_DIR
48 DISPLAYCONSUMER_DIR = $(subst \,/,$(PEGASUS_DISPLAYCONSUMER_DIR))
49 else
|
50 kumpf 1.38 DISPLAYCONSUMER_DIR = $(subst \,/,$(PEGASUS_HOME))
|
51 kumpf 1.26 endif
52
|
53 mike 1.14 VALID_PLATFORMS = \
54 WIN32_IX86_MSVC \
55 LINUX_IX86_GNU \
|
56 david.eger 1.32 LINUX_PPC_GNU \
|
57 w.otsuka 1.64.2.2 LINUX_PPC64_GNU \
|
58 kumpf 1.19 LINUX_IA64_GNU \
|
59 david.eger 1.33 LINUX_ZSERIES_GNU \
|
60 w.otsuka 1.64.2.2 LINUX_ZSERIES64_GNU \
|
61 mike 1.14 AIX_RS_IBMCXX \
62 HPUX_PARISC_ACC \
|
63 kumpf 1.22 HPUX_IA64_ACC \
|
64 mike 1.15 TRU64_ALPHA_DECCXX \
|
65 mike 1.16 SOLARIS_SPARC_GNU \
|
66 keith.petley 1.34 SOLARIS_SPARC_CC \
|
67 mike 1.16 ZOS_ZSERIES_IBM \
|
68 dudhe.girish 1.48 NSK_NONSTOP_NMCPLUS \
69 DARWIN_PPC_GNU
|
70 mike 1.8
71 ifndef PEGASUS_PLATFORM
72 ERROR = pegasus_platform_undefined
73 pegasus_platform_undefined:
74 @ echo PEGASUS_PLATFORM environment variable undefined. Please set to\
75 one of the following: $(VALID_PLATFORMS)
76 @ exit 1
77 endif
78
|
79 mike 1.1 ################################################################################
80
|
81 kumpf 1.22 OBJ_DIR = $(HOME_DIR)/obj/$(DIR)
82 BIN_DIR = $(HOME_DIR)/bin
83 LIB_DIR = $(HOME_DIR)/lib
|
84 chuck 1.35
85 # l10n
86 # define the location for the compiled messages
87 MSG_ROOT = $(HOME_DIR)/msg
|
88 kumpf 1.22
89 # define the location for the repository
90 REPOSITORY_DIR = $(HOME_DIR)
91 REPOSITORY_ROOT = $(REPOSITORY_DIR)/repository
|
92 mike 1.1
|
93 kumpf 1.23 # The two variables, CIM_SCHEMA_DIR and CIM_SCHEMA_VER,
94 # are used to control the version of the CIM Schema
95 # loaded into the Pegasus Internal, InterOp,
96 # root/cimv2 and various test namespaces.
97 #
98 # Update the following two environment variables to
99 # change the version.
100
|
101 kumpf 1.37 # The environment variable PEGASUS_CIM_SCHEMA can be used
102 # to change the values of CIM_SCHEMA_DIR, CIM_SCHEMA_VER
103 # and ALLOW_EXPERIMENTAL.
104 #
105 # To use the PEGASUS_CIM_SCHEMA variable the Schema mof
106 # files must be placed in the directory
107 # $(PEGAUS_ROOT)/Schemas/$(PEGASUS_CIM_SCHEMA)
108 #
109 # The value of PEGASUS_CIM_SCHEMA must conform to the
110 # following syntax:
111 #
112 # CIM[Prelim]<CIM_SCHEMA_VER>
113 #
114 # The string "Prelim" should be included if the
115 # Schema contains "Experimental" class definitions.
116 #
117 # The value of <CIM_SCHEMA_VER> must be the value
118 # of the version string included by the DMTF as
119 # part of the mof file names (e.g, CIM_Core27.mof).
120 # Therefore, for example, the value of <CIM_SCHEMA_VER>
121 # for CIM27 Schema directories MUST be 27.
122 kumpf 1.37 #
123 # Examples of valid values of PEGASUS_CIM_SCHEMA
124 # include CIMPrelim27, CIM27, CIMPrelim28, and CIM28.
125 #
126 # Note the CIMPrelim271 would NOT be a valid value
127 # for PEGASUS_CIM_SCHEMA because the version string
128 # portion of the mof files (e.g., CIM_Core27.mof) in
129 # the CIMPrelimin271 directory is 27 not 271.
|
130 kumpf 1.23
|
131 gerarda 1.29 # ***** CIM_SCHEMA_DIR INFO ****
132 # If CIM_SCHEMA_DIR changes to use a preliminary schema which
133 # has experimentals make sure and change the path below to appopriate
134 # directory path. Example: CIMPrelim271 is preliminary and has
135 # experimental classes. Since experimental classes exist the -aE
136 # option of the mof compiler needs to be set.
137 # *****
|
138 kumpf 1.37
139 ifdef PEGASUS_CIM_SCHEMA
140 CIM_SCHEMA_DIR=$(PEGASUS_ROOT)/Schemas/$(PEGASUS_CIM_SCHEMA)
|
141 dj.gorey 1.59 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),)
|
142 dj.gorey 1.58 CIM_SCHEMA_VER=
143 else
144 CIM_SCHEMA_VER=$(patsubst CIM%,%,$(patsubst CIMPrelim%,%,$(PEGASUS_CIM_SCHEMA)))
145 endif
|
146 kumpf 1.37 else
|
147 karl 1.51 CIM_SCHEMA_DIR=$(PEGASUS_ROOT)/Schemas/CIM28
148 CIM_SCHEMA_VER=28
|
149 kumpf 1.37 endif
150
151 ifneq (, $(findstring Prelim, $(CIM_SCHEMA_DIR)))
152 ALLOW_EXPERIMENTAL = -aE
|
153 gerarda 1.29 else
|
154 kumpf 1.37 ALLOW_EXPERIMENTAL =
|
155 gerarda 1.29 endif
156
|
157 bob 1.5 LEX = flex
158
|
159 mike 1.8 ################################################################################
160 ##
|
161 konrad.r 1.52 ## Default installation paths
162 ##
163 ################################################################################
164
165 ## Default values to install files when 'make install' is invoked.
166
167 ifndef PREFIX
168 PREFIX=$(HOME_DIR)/install
169 endif
170
171 ifndef SYSCONF_PREFIX
172 SYSCONF_PREFIX=$(PREFIX)/etc
173 endif
174
175 ifndef LOCAL_STATE_PREFIX
|
176 konrad.r 1.53 LOCAL_STATE_PREFIX=$(PREFIX)/var/
|
177 konrad.r 1.52 endif
178
179 ifndef DEST_LIB_DIR
180 DEST_LIB_DIR = $(PREFIX)/lib
181 endif
182
183 ifndef DEST_BIN_DIR
184 DEST_BIN_DIR = $(PREFIX)/bin
185 endif
186
187 ifndef DEST_SBIN_DIR
188 DEST_SBIN_DIR = $(PREFIX)/sbin
189 endif
190
191 ifndef DEST_ETC_DIR
|
192 konrad.r 1.54 DEST_ETC_DIR = $(SYSCONF_PREFIX)/pegasus
|
193 konrad.r 1.52 endif
194
195 ifndef DEST_MAN_DIR
196 DEST_MAN_DIR = $(PREFIX)/man
197 endif
198
199 ifndef DEST_VAR_DIR
200 DEST_VAR_DIR = $(LOCAL_STATE_PREFIX)
201 endif
202
203 ################################################################################
204 ##
|
205 mike 1.8 ## Attempt to include a platform configuration file:
206 ##
207 ################################################################################
208
|
209 mike 1.9 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
210 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
|
211 mike 1.8 FOUND = true
212 endif
213
|
214 mike 1.9 ifeq ($(PEGASUS_PLATFORM),LINUX_IX86_GNU)
|
215 david.eger 1.32 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
216 FOUND = true
217 endif
218
219 ifeq ($(PEGASUS_PLATFORM),LINUX_PPC_GNU)
|
220 kumpf 1.19 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
221 FOUND = true
222 endif
223
|
224 denise.eckstein 1.64.2.6 ifeq ($(PEGASUS_PLATFORM),LINUX_PPC64_GNU)
225 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
226 FOUND = true
227 endif
228
|
229 kumpf 1.19 ifeq ($(PEGASUS_PLATFORM),LINUX_IA64_GNU)
|
230 david.eger 1.33 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
231 FOUND = true
232 endif
233
234 ifeq ($(PEGASUS_PLATFORM),LINUX_ZSERIES_GNU)
|
235 mike 1.12 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
236 FOUND = true
237 endif
238
|
239 w.otsuka 1.64.2.5 ifeq ($(PEGASUS_PLATFORM),LINUX_ZSERIES64_GNU)
240 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
241 FOUND = true
242 endif
243
|
244 mike 1.12 ifeq ($(PEGASUS_PLATFORM),AIX_RS_IBMCXX)
|
245 mike 1.13 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
246 FOUND = true
247 endif
248
249 ifeq ($(PEGASUS_PLATFORM),HPUX_PARISC_ACC)
|
250 kumpf 1.22 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
251 FOUND = true
252 endif
253
254 ifeq ($(PEGASUS_PLATFORM),HPUX_IA64_ACC)
|
255 mike 1.14 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
256 FOUND = true
257 endif
258
259 ifeq ($(PEGASUS_PLATFORM),TRU64_ALPHA_DECCXX)
|
260 mike 1.15 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
261 FOUND = true
262 endif
263
264 ifeq ($(PEGASUS_PLATFORM),SOLARIS_SPARC_GNU)
|
265 keith.petley 1.34 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
266 FOUND = true
267 endif
268
269 ifeq ($(PEGASUS_PLATFORM),SOLARIS_SPARC_CC)
|
270 mike 1.9 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
|
271 mike 1.8 FOUND = true
|
272 mike 1.16 endif
273
274 ifeq ($(PEGASUS_PLATFORM),ZOS_ZSERIES_IBM)
275 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
276 FOUND = true
277 endif
278
279 ifeq ($(PEGASUS_PLATFORM),NSK_NONSTOP_NMCPLUS)
|
280 dudhe.girish 1.48 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
281 FOUND = true
282 endif
283
284 ifeq ($(PEGASUS_PLATFORM),DARWIN_PPC_GNU)
|
285 mike 1.16 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
286 FOUND = true
|
287 mike 1.8 endif
288
289 ifneq ($(FOUND),true)
290 ERROR = pegasus_unknown_platform
291 pegasus_unknown_platform:
292 @ echo PEGASUS_PLATFORM environment variable must be set to one of\
293 the following: $(VALID_PLATFORMS)
294 @ exit 1
295 endif
|
296 karl 1.17
|
297 karl 1.36 ################################################################################
298 ##
|
299 konrad.r 1.52 ## Default installation macros
300 ##
301 ################################################################################
302
303 ## INSTALL_LIB creates the destination directory if missing,
304 ## copies the library and generates the symbolic link.
305
306 ifndef INSTALL_LIBRARY
307 ## These macros are also defined in the Platform_<*>.mak files.
308 INSTALL_LIBRARY = $(MKDIRHIER) $(DEST_LIB_DIR); $(COPY) $(FULL_LIB) $(DEST_LIB_DIR)
309 endif
310
311 ## INSTALL_PROGRAM creates the destination directory if missing and
312 ## copies the file.
313 ifndef INSTALL_PROGRAM
314 INSTALL_PROGRAM = $(MKDIRHIER) $(DEST_BIN_DIR); $(COPY) $(FULL_PROGRAM) $(DEST_BIN_DIR)
315 endif
316 ## INSTALL_PROGRAM creates the destination directory if missing and
317 ## copies the file.
318 ifndef INSTALL_SBIN_PROGRAM
319 INSTALL_SBIN_PROGRAM = $(MKDIRHIER) $(DEST_SBIN_DIR); $(COPY) $(FULL_PROGRAM) $(DEST_SBIN_DIR)
320 konrad.r 1.52 endif
321 ## The rest of the macros for DEST_MAN_DIR, DEST_VAR_DIR, etc. are not provided in this file.
322
323 ################################################################################
324 ##
|
325 karl 1.36 ## Set up any platform independent compile conditionals by adding them to
326 ## precreated FLAGS parameter.
327 ## Assumes that the basic flags have been setup in FLAGS.
328 ## Assumes that compile time flags are controlled with -D CLI option.
329 ##
330 ################################################################################
|
331 karl 1.17
|
332 karl 1.36 # Setup the conditional compile for client displays.
333 #
334 ifdef PEGASUS_CLIENT_TRACE_ENABLE
335 DEFINES+= -DPEGASUS_CLIENT_TRACE_ENABLE
336 endif
337
|
338 mday 1.40 # do not compile trace code. sometimes it causes problems debugging
339 ifdef PEGASUS_REMOVE_TRACE
340 DEFINES+= -DPEGASUS_REMOVE_TRACE
341 endif
342
|
343 kumpf 1.64.2.4 # Allow PEGASUS_ASSERT statements to be disabled
344 ifdef PEGASUS_NOASSERTS
345 DEFINES += -DNDEBUG
346 endif
347
|
348 karl 1.43 # PEP 123 use monitor2 (the default) or not
|
349 dj.gorey 1.46 #ifdef PEGASUS_USE_23HTTPMONITOR_SERVER
350 DEFINES+= -DPEGASUS_USE_23HTTPMONITOR_SERVER
351 #endif
|
352 mday 1.40
|
353 dj.gorey 1.45 #BUG 1170 Monitor2 Client Workaround
|
354 dj.gorey 1.46 #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT
|
355 dj.gorey 1.45 DEFINES+= -DPEGASUS_USE_23HTTPMONITOR_CLIENT
|
356 dj.gorey 1.46 #endif
|
357 dj.gorey 1.45
|
358 chuck 1.47 # PEP 161
359 # Control whether utf-8 filenames are supported by the repository
360 ifdef PEGASUS_SUPPORT_UTF8_FILENAME
361 DEFINES+= -DPEGASUS_SUPPORT_UTF8_FILENAME
362
363 # Control whether utf-8 filenames in the repository are escaped
364 ifdef PEGASUS_REPOSITORY_ESCAPE_UTF8
365 DEFINES+= -DPEGASUS_REPOSITORY_ESCAPE_UTF8
366 endif
367 endif
368
|
369 kumpf 1.49 #
370 # PEP 142
371 # The following flag need to be set to enable
372 # user group authorization functionality.
373 #
374 ifdef PEGASUS_ENABLE_USERGROUP_AUTHORIZATION
375 DEFINES += -DPEGASUS_ENABLE_USERGROUP_AUTHORIZATION
376 endif
377
|
378 w.otsuka 1.64.2.3 # Allow ExecQuery functionality to be enabled
379 ifndef PEGASUS_ENABLE_EXECQUERY
380 DEFINES += -DPEGASUS_DISABLE_EXECQUERY
381 endif
|
382 kumpf 1.49
|
383 karl 1.39 # setup function to enable SLP functions in the Pegasus standard compile
384 # Set the environment varaible PEGASUS_ENABLE_SLP to enable SLP code.
385 ifdef PEGASUS_ENABLE_SLP
386 DEFINES+= -DPEGASUS_ENABLE_SLP
387 endif
|
388 karl 1.36
|
389 karl 1.60 # set PEGASUS_DEBUG into the DEFINES if it exists.
390 # Note that this flag is the general separator between
391 # debug compiles and non-debug compiles and controls both
392 # the use of any debug options on compilers and linkers
393 # and general debug support that we want to be turned on in
394 # debug mode.
395 ifdef PEGASUS_DEBUG
396 DEFINES+= -DPEGASUS_DEBUG
397 endif
398
|
399 chuck 1.42 # compile in the experimental APIs
400 DEFINES+= -DPEGASUS_USE_EXPERIMENTAL_INTERFACES
401
|
402 w.white 1.57 # Set compile flag to control compilation of CIMOM statistics
403 ifdef PEGASUS_HAS_PERFINST
404 FLAGS += -DPEGASUS_HAS_PERFINST
405 endif
|
406 kumpf 1.56
407 ############################################################
408 #
409 # Set any vendor-specific compile flags
410 #
411 ############################################################
412
413 ifdef PEGASUS_VENDOR_HP
414 DEFINES+= -DPEGASUS_VENDOR_HP
415 endif
416
|
417 karl 1.36
|
418 karl 1.17 ############################################################
419 #
420 # Set up other Make Variables that depend on platform config files
421 #
422 ############################################################
423
424 # This is temporary until we end up with a better place to
425 # put this variable
426 # Makefiles can do directory remove with
427 # $(RMREPOSITORY) repositoryname
428 #
429 RMREPOSITORY = $(RMDIRHIER)
430
|
431 w.otsuka 1.63 ifdef PEGASUS_USE_RELEASE_CONFIG_OPTIONS
432 FLAGS += -DPEGASUS_USE_RELEASE_CONFIG_OPTIONS
|
433 w.otsuka 1.62 endif
434
435 ifdef PEGASUS_USE_RELEASE_DIRS
436 FLAGS += -DPEGASUS_USE_RELEASE_DIRS
437 endif
|
438 mday 1.27
|
439 kumpf 1.64 # Unless otherwise specified, Pegasus libraries go in $(PEGASUS_HOME)/lib
440 ifndef PEGASUS_DEST_LIB_DIR
441 PEGASUS_DEST_LIB_DIR = lib
442 endif
|
443 mday 1.28
|
444 kumpf 1.64 DEFINES += -DPEGASUS_DEST_LIB_DIR=\"$(PEGASUS_DEST_LIB_DIR)\"
|
445 w.otsuka 1.64.2.1
446 ################################################################################
447 ##
448 ## Additional build flags passed in through environment variables.
449 ## These flags are added to the compile/link commands.
450 ##
451 ################################################################################
452
453 ifdef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
454 ifdef PEGASUS_EXTRA_CXX_FLAGS
455 EXTRA_CXX_FLAGS = $(PEGASUS_EXTRA_CXX_FLAGS)
456 endif
457
458 ifdef PEGASUS_EXTRA_C_FLAGS
459 EXTRA_C_FLAGS = $(PEGASUS_EXTRA_C_FLAGS)
460 endif
461
462 ifdef PEGASUS_EXTRA_LINK_FLAGS
463 EXTRA_LINK_FLAGS = $(PEGASUS_EXTRA_LINK_FLAGS)
464 endif
465 endif
|