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