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 ifeq ($(PEGASUS_PLATFORM),LINUX_IA64_GNU)
|
225 david.eger 1.33 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
226 FOUND = true
227 endif
228
229 ifeq ($(PEGASUS_PLATFORM),LINUX_ZSERIES_GNU)
|
230 mike 1.12 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
231 FOUND = true
232 endif
233
234 ifeq ($(PEGASUS_PLATFORM),AIX_RS_IBMCXX)
|
235 mike 1.13 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
236 FOUND = true
237 endif
238
239 ifeq ($(PEGASUS_PLATFORM),HPUX_PARISC_ACC)
|
240 kumpf 1.22 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
241 FOUND = true
242 endif
243
244 ifeq ($(PEGASUS_PLATFORM),HPUX_IA64_ACC)
|
245 mike 1.14 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
246 FOUND = true
247 endif
248
249 ifeq ($(PEGASUS_PLATFORM),TRU64_ALPHA_DECCXX)
|
250 mike 1.15 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
251 FOUND = true
252 endif
253
254 ifeq ($(PEGASUS_PLATFORM),SOLARIS_SPARC_GNU)
|
255 keith.petley 1.34 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
256 FOUND = true
257 endif
258
259 ifeq ($(PEGASUS_PLATFORM),SOLARIS_SPARC_CC)
|
260 mike 1.9 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
|
261 mike 1.8 FOUND = true
|
262 mike 1.16 endif
263
264 ifeq ($(PEGASUS_PLATFORM),ZOS_ZSERIES_IBM)
265 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
266 FOUND = true
267 endif
268
269 ifeq ($(PEGASUS_PLATFORM),NSK_NONSTOP_NMCPLUS)
|
270 dudhe.girish 1.48 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
271 FOUND = true
272 endif
273
274 ifeq ($(PEGASUS_PLATFORM),DARWIN_PPC_GNU)
|
275 mike 1.16 include $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
276 FOUND = true
|
277 mike 1.8 endif
278
279 ifneq ($(FOUND),true)
280 ERROR = pegasus_unknown_platform
281 pegasus_unknown_platform:
282 @ echo PEGASUS_PLATFORM environment variable must be set to one of\
283 the following: $(VALID_PLATFORMS)
284 @ exit 1
285 endif
|
286 karl 1.17
|
287 karl 1.36 ################################################################################
288 ##
|
289 konrad.r 1.52 ## Default installation macros
290 ##
291 ################################################################################
292
293 ## INSTALL_LIB creates the destination directory if missing,
294 ## copies the library and generates the symbolic link.
295
296 ifndef INSTALL_LIBRARY
297 ## These macros are also defined in the Platform_<*>.mak files.
298 INSTALL_LIBRARY = $(MKDIRHIER) $(DEST_LIB_DIR); $(COPY) $(FULL_LIB) $(DEST_LIB_DIR)
299 endif
300
301 ## INSTALL_PROGRAM creates the destination directory if missing and
302 ## copies the file.
303 ifndef INSTALL_PROGRAM
304 INSTALL_PROGRAM = $(MKDIRHIER) $(DEST_BIN_DIR); $(COPY) $(FULL_PROGRAM) $(DEST_BIN_DIR)
305 endif
306 ## INSTALL_PROGRAM creates the destination directory if missing and
307 ## copies the file.
308 ifndef INSTALL_SBIN_PROGRAM
309 INSTALL_SBIN_PROGRAM = $(MKDIRHIER) $(DEST_SBIN_DIR); $(COPY) $(FULL_PROGRAM) $(DEST_SBIN_DIR)
310 konrad.r 1.52 endif
311 ## The rest of the macros for DEST_MAN_DIR, DEST_VAR_DIR, etc. are not provided in this file.
312
313 ################################################################################
314 ##
|
315 karl 1.36 ## Set up any platform independent compile conditionals by adding them to
316 ## precreated FLAGS parameter.
317 ## Assumes that the basic flags have been setup in FLAGS.
318 ## Assumes that compile time flags are controlled with -D CLI option.
319 ##
320 ################################################################################
|
321 karl 1.17
|
322 karl 1.36 # Setup the conditional compile for client displays.
323 #
324 ifdef PEGASUS_CLIENT_TRACE_ENABLE
325 DEFINES+= -DPEGASUS_CLIENT_TRACE_ENABLE
326 endif
327
|
328 mday 1.40 # do not compile trace code. sometimes it causes problems debugging
329 ifdef PEGASUS_REMOVE_TRACE
330 DEFINES+= -DPEGASUS_REMOVE_TRACE
331 endif
332
|
333 karl 1.43 # PEP 123 use monitor2 (the default) or not
|
334 dj.gorey 1.46 #ifdef PEGASUS_USE_23HTTPMONITOR_SERVER
335 DEFINES+= -DPEGASUS_USE_23HTTPMONITOR_SERVER
336 #endif
|
337 mday 1.40
|
338 dj.gorey 1.45 #BUG 1170 Monitor2 Client Workaround
|
339 dj.gorey 1.46 #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT
|
340 dj.gorey 1.45 DEFINES+= -DPEGASUS_USE_23HTTPMONITOR_CLIENT
|
341 dj.gorey 1.46 #endif
|
342 dj.gorey 1.45
|
343 chuck 1.47 # PEP 161
344 # Control whether utf-8 filenames are supported by the repository
345 ifdef PEGASUS_SUPPORT_UTF8_FILENAME
346 DEFINES+= -DPEGASUS_SUPPORT_UTF8_FILENAME
347
348 # Control whether utf-8 filenames in the repository are escaped
349 ifdef PEGASUS_REPOSITORY_ESCAPE_UTF8
350 DEFINES+= -DPEGASUS_REPOSITORY_ESCAPE_UTF8
351 endif
352 endif
353
|
354 kumpf 1.49 #
355 # PEP 142
356 # The following flag need to be set to enable
357 # user group authorization functionality.
358 #
359 ifdef PEGASUS_ENABLE_USERGROUP_AUTHORIZATION
360 DEFINES += -DPEGASUS_ENABLE_USERGROUP_AUTHORIZATION
361 endif
362
363
|
364 karl 1.39 # setup function to enable SLP functions in the Pegasus standard compile
365 # Set the environment varaible PEGASUS_ENABLE_SLP to enable SLP code.
366 ifdef PEGASUS_ENABLE_SLP
367 DEFINES+= -DPEGASUS_ENABLE_SLP
368 endif
|
369 karl 1.36
|
370 karl 1.60 # set PEGASUS_DEBUG into the DEFINES if it exists.
371 # Note that this flag is the general separator between
372 # debug compiles and non-debug compiles and controls both
373 # the use of any debug options on compilers and linkers
374 # and general debug support that we want to be turned on in
375 # debug mode.
376 ifdef PEGASUS_DEBUG
377 DEFINES+= -DPEGASUS_DEBUG
378 endif
379
|
380 chuck 1.42 # compile in the experimental APIs
381 DEFINES+= -DPEGASUS_USE_EXPERIMENTAL_INTERFACES
382
|
383 w.white 1.57 # Set compile flag to control compilation of CIMOM statistics
384 ifdef PEGASUS_HAS_PERFINST
385 FLAGS += -DPEGASUS_HAS_PERFINST
386 endif
|
387 kumpf 1.56
388 ############################################################
389 #
390 # Set any vendor-specific compile flags
391 #
392 ############################################################
393
394 ifdef PEGASUS_VENDOR_HP
395 DEFINES+= -DPEGASUS_VENDOR_HP
396 endif
397
|
398 karl 1.36
|
399 karl 1.17 ############################################################
400 #
401 # Set up other Make Variables that depend on platform config files
402 #
403 ############################################################
404
405 # This is temporary until we end up with a better place to
406 # put this variable
407 # Makefiles can do directory remove with
408 # $(RMREPOSITORY) repositoryname
409 #
410 RMREPOSITORY = $(RMDIRHIER)
411
|
412 w.otsuka 1.63 ifdef PEGASUS_USE_RELEASE_CONFIG_OPTIONS
413 FLAGS += -DPEGASUS_USE_RELEASE_CONFIG_OPTIONS
|
414 w.otsuka 1.62 endif
415
416 ifdef PEGASUS_USE_RELEASE_DIRS
417 FLAGS += -DPEGASUS_USE_RELEASE_DIRS
418 endif
|
419 mday 1.27
|
420 kumpf 1.64 # Unless otherwise specified, Pegasus libraries go in $(PEGASUS_HOME)/lib
421 ifndef PEGASUS_DEST_LIB_DIR
422 PEGASUS_DEST_LIB_DIR = lib
423 endif
|
424 mday 1.28
|
425 kumpf 1.64 DEFINES += -DPEGASUS_DEST_LIB_DIR=\"$(PEGASUS_DEST_LIB_DIR)\"
|
426 w.otsuka 1.64.2.1
427 ################################################################################
428 ##
429 ## Additional build flags passed in through environment variables.
430 ## These flags are added to the compile/link commands.
431 ##
432 ################################################################################
433
434 ifdef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
435 ifdef PEGASUS_EXTRA_CXX_FLAGS
436 EXTRA_CXX_FLAGS = $(PEGASUS_EXTRA_CXX_FLAGS)
437 endif
438
439 ifdef PEGASUS_EXTRA_C_FLAGS
440 EXTRA_C_FLAGS = $(PEGASUS_EXTRA_C_FLAGS)
441 endif
442
443 ifdef PEGASUS_EXTRA_LINK_FLAGS
444 EXTRA_LINK_FLAGS = $(PEGASUS_EXTRA_LINK_FLAGS)
445 endif
446 endif
|