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 TEMP=$(subst $(ROOT)/mak/platform_,, $(PLATFORM_FILES))
49 VALID_PLATFORMS=$(subst .mak,, $(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 # define the location for the repository
67 REPOSITORY_DIR = $(HOME_DIR)
68 REPOSITORY_ROOT = $(REPOSITORY_DIR)/repository
|
69 mike 1.1
|
70 kumpf 1.23 # The two variables, CIM_SCHEMA_DIR and CIM_SCHEMA_VER,
71 # are used to control the version of the CIM Schema
72 # loaded into the Pegasus Internal, InterOp,
73 # root/cimv2 and various test namespaces.
74 #
75 # Update the following two environment variables to
76 # change the version.
77
|
78 kumpf 1.37 # The environment variable PEGASUS_CIM_SCHEMA can be used
79 # to change the values of CIM_SCHEMA_DIR, CIM_SCHEMA_VER
80 # and ALLOW_EXPERIMENTAL.
81 #
82 # To use the PEGASUS_CIM_SCHEMA variable the Schema mof
83 # files must be placed in the directory
84 # $(PEGAUS_ROOT)/Schemas/$(PEGASUS_CIM_SCHEMA)
85 #
86 # The value of PEGASUS_CIM_SCHEMA must conform to the
87 # following syntax:
88 #
89 # CIM[Prelim]<CIM_SCHEMA_VER>
90 #
91 # The string "Prelim" should be included if the
92 # Schema contains "Experimental" class definitions.
93 #
94 # The value of <CIM_SCHEMA_VER> must be the value
95 # of the version string included by the DMTF as
96 # part of the mof file names (e.g, CIM_Core27.mof).
97 # Therefore, for example, the value of <CIM_SCHEMA_VER>
98 # for CIM27 Schema directories MUST be 27.
99 kumpf 1.37 #
100 # Examples of valid values of PEGASUS_CIM_SCHEMA
101 # include CIMPrelim27, CIM27, CIMPrelim28, and CIM28.
102 #
103 # Note the CIMPrelim271 would NOT be a valid value
104 # for PEGASUS_CIM_SCHEMA because the version string
105 # portion of the mof files (e.g., CIM_Core27.mof) in
106 # the CIMPrelimin271 directory is 27 not 271.
|
107 kumpf 1.23
|
108 gerarda 1.29 # ***** CIM_SCHEMA_DIR INFO ****
109 # If CIM_SCHEMA_DIR changes to use a preliminary schema which
110 # has experimentals make sure and change the path below to appopriate
111 # directory path. Example: CIMPrelim271 is preliminary and has
112 # experimental classes. Since experimental classes exist the -aE
113 # option of the mof compiler needs to be set.
114 # *****
|
115 kumpf 1.37
116 ifdef PEGASUS_CIM_SCHEMA
|
117 david.dillard 1.65 CIM_SCHEMA_DIR=$(PEGASUS_ROOT)/Schemas/$(PEGASUS_CIM_SCHEMA)
118 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),)
119 CIM_SCHEMA_VER=
120 else
121 CIM_SCHEMA_VER=$(patsubst CIM%,%,$(patsubst CIMPrelim%,%,$(PEGASUS_CIM_SCHEMA)))
122 endif
|
123 kumpf 1.37 else
|
124 david.dillard 1.65 CIM_SCHEMA_DIR=$(PEGASUS_ROOT)/Schemas/CIM28
125 CIM_SCHEMA_VER=28
|
126 kumpf 1.37 endif
127
128 ifneq (, $(findstring Prelim, $(CIM_SCHEMA_DIR)))
|
129 david.dillard 1.65 ALLOW_EXPERIMENTAL = -aE
|
130 gerarda 1.29 else
|
131 david.dillard 1.65 ALLOW_EXPERIMENTAL =
|
132 gerarda 1.29 endif
133
|
134 bob 1.5 LEX = flex
135
|
136 mike 1.8 ################################################################################
137 ##
|
138 konrad.r 1.52 ## Default installation paths
139 ##
140 ################################################################################
141
142 ## Default values to install files when 'make install' is invoked.
143
144 ifndef PREFIX
|
145 david.dillard 1.65 PREFIX=$(HOME_DIR)/install
|
146 konrad.r 1.52 endif
147
148 ifndef SYSCONF_PREFIX
|
149 david.dillard 1.65 SYSCONF_PREFIX=$(PREFIX)/etc
|
150 konrad.r 1.52 endif
151
152 ifndef LOCAL_STATE_PREFIX
|
153 david.dillard 1.65 LOCAL_STATE_PREFIX=$(PREFIX)/var/
|
154 konrad.r 1.52 endif
155
156 ifndef DEST_LIB_DIR
|
157 david.dillard 1.65 DEST_LIB_DIR = $(PREFIX)/lib
|
158 konrad.r 1.52 endif
159
160 ifndef DEST_BIN_DIR
|
161 david.dillard 1.65 DEST_BIN_DIR = $(PREFIX)/bin
|
162 konrad.r 1.52 endif
163
164 ifndef DEST_SBIN_DIR
|
165 david.dillard 1.65 DEST_SBIN_DIR = $(PREFIX)/sbin
|
166 konrad.r 1.52 endif
167
168 ifndef DEST_ETC_DIR
|
169 david.dillard 1.65 DEST_ETC_DIR = $(SYSCONF_PREFIX)/pegasus
|
170 konrad.r 1.52 endif
171
172 ifndef DEST_MAN_DIR
|
173 david.dillard 1.65 DEST_MAN_DIR = $(PREFIX)/man
|
174 konrad.r 1.52 endif
175
176 ifndef DEST_VAR_DIR
|
177 david.dillard 1.65 DEST_VAR_DIR = $(LOCAL_STATE_PREFIX)
|
178 konrad.r 1.52 endif
179
180 ################################################################################
181 ##
|
182 mike 1.8 ## Attempt to include a platform configuration file:
183 ##
184 ################################################################################
185
|
186 david.dillard 1.66 PLATFORM_FILE = $(ROOT)/mak/platform_$(PEGASUS_PLATFORM).mak
187 ifneq ($(wildcard $(PLATFORM_FILE)), )
188 include $(PLATFORM_FILE)
189 else
|
190 david.dillard 1.65 $(error PEGASUS_PLATFORM environment variable must be set to one of\
|
191 david.dillard 1.66 the following:$(VALID_PLATFORMS))
|
192 mike 1.8 endif
|
193 karl 1.17
|
194 karl 1.36 ################################################################################
195 ##
|
196 konrad.r 1.52 ## Default installation macros
197 ##
198 ################################################################################
199
200 ## INSTALL_LIB creates the destination directory if missing,
201 ## copies the library and generates the symbolic link.
202
203 ifndef INSTALL_LIBRARY
|
204 david.dillard 1.65 ## These macros are also defined in the Platform_<*>.mak files.
205 INSTALL_LIBRARY = $(MKDIRHIER) $(DEST_LIB_DIR); $(COPY) $(FULL_LIB) $(DEST_LIB_DIR)
|
206 konrad.r 1.52 endif
207
208 ## INSTALL_PROGRAM creates the destination directory if missing and
209 ## copies the file.
210 ifndef INSTALL_PROGRAM
|
211 david.dillard 1.65 INSTALL_PROGRAM = $(MKDIRHIER) $(DEST_BIN_DIR); $(COPY) $(FULL_PROGRAM) $(DEST_BIN_DIR)
|
212 konrad.r 1.52 endif
213 ## INSTALL_PROGRAM creates the destination directory if missing and
214 ## copies the file.
215 ifndef INSTALL_SBIN_PROGRAM
|
216 david.dillard 1.65 INSTALL_SBIN_PROGRAM = $(MKDIRHIER) $(DEST_SBIN_DIR); $(COPY) $(FULL_PROGRAM) $(DEST_SBIN_DIR)
|
217 konrad.r 1.52 endif
218 ## The rest of the macros for DEST_MAN_DIR, DEST_VAR_DIR, etc. are not provided in this file.
219
220 ################################################################################
221 ##
|
222 karl 1.36 ## Set up any platform independent compile conditionals by adding them to
223 ## precreated FLAGS parameter.
224 ## Assumes that the basic flags have been setup in FLAGS.
225 ## Assumes that compile time flags are controlled with -D CLI option.
226 ##
227 ################################################################################
|
228 karl 1.17
|
229 karl 1.36 # Setup the conditional compile for client displays.
230 #
231 ifdef PEGASUS_CLIENT_TRACE_ENABLE
|
232 david.dillard 1.65 DEFINES += -DPEGASUS_CLIENT_TRACE_ENABLE
|
233 karl 1.36 endif
234
|
235 mday 1.40 # do not compile trace code. sometimes it causes problems debugging
236 ifdef PEGASUS_REMOVE_TRACE
|
237 david.dillard 1.65 DEFINES += -DPEGASUS_REMOVE_TRACE
|
238 mday 1.40 endif
239
|
240 karl 1.43 # PEP 123 use monitor2 (the default) or not
|
241 dj.gorey 1.46 #ifdef PEGASUS_USE_23HTTPMONITOR_SERVER
|
242 david.dillard 1.65 DEFINES += -DPEGASUS_USE_23HTTPMONITOR_SERVER
|
243 dj.gorey 1.46 #endif
|
244 mday 1.40
|
245 dj.gorey 1.45 #BUG 1170 Monitor2 Client Workaround
|
246 dj.gorey 1.46 #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT
|
247 david.dillard 1.65 DEFINES += -DPEGASUS_USE_23HTTPMONITOR_CLIENT
|
248 dj.gorey 1.46 #endif
|
249 dj.gorey 1.45
|
250 konrad.r 1.69 # Enable CMPI by default.
251 #
252 DEFINES += -DPEGASUS_ENABLE_CMPI_PROVIDER_MANAGER -DPEGASUS_CMPI_PROVIDER_INTERNAL
253
|
254 chuck 1.47 # PEP 161
255 # Control whether utf-8 filenames are supported by the repository
256 ifdef PEGASUS_SUPPORT_UTF8_FILENAME
|
257 david.dillard 1.65 DEFINES += -DPEGASUS_SUPPORT_UTF8_FILENAME
|
258 chuck 1.47
|
259 david.dillard 1.65 # Control whether utf-8 filenames in the repository are escaped
260 ifdef PEGASUS_REPOSITORY_ESCAPE_UTF8
261 DEFINES += -DPEGASUS_REPOSITORY_ESCAPE_UTF8
262 endif
|
263 chuck 1.47 endif
264
|
265 kumpf 1.49 #
266 # PEP 142
267 # The following flag need to be set to enable
268 # user group authorization functionality.
269 #
270 ifdef PEGASUS_ENABLE_USERGROUP_AUTHORIZATION
|
271 david.dillard 1.65 DEFINES += -DPEGASUS_ENABLE_USERGROUP_AUTHORIZATION
|
272 kumpf 1.49 endif
273
|
274 chuck 1.67 #
275 # PEP 193
276 # The following flag need to be set to disable
277 # CQL in indication subscriptions
278 #
279 ifdef PEGASUS_DISABLE_CQL
280 DEFINES += -DPEGASUS_DISABLE_CQL
281 endif
282
|
283 kumpf 1.68 #
284 # PEP 186
285 # Allow override of product name/version/status. A file
286 # pegasus/src/Pegasus/Common/ProductVersion.h must exist when this
287 # flag is defined.
288 #
289 ifdef PEGASUS_OVERRIDE_PRODUCT_ID
290 DEFINES += -DPEGASUS_OVERRIDE_PRODUCT_ID
291 endif
292
|
293 kumpf 1.49
|
294 karl 1.39 # setup function to enable SLP functions in the Pegasus standard compile
295 # Set the environment varaible PEGASUS_ENABLE_SLP to enable SLP code.
296 ifdef PEGASUS_ENABLE_SLP
|
297 david.dillard 1.65 DEFINES += -DPEGASUS_ENABLE_SLP
|
298 karl 1.39 endif
|
299 karl 1.36
|
300 karl 1.60 # set PEGASUS_DEBUG into the DEFINES if it exists.
301 # Note that this flag is the general separator between
302 # debug compiles and non-debug compiles and controls both
303 # the use of any debug options on compilers and linkers
304 # and general debug support that we want to be turned on in
305 # debug mode.
306 ifdef PEGASUS_DEBUG
|
307 david.dillard 1.65 DEFINES += -DPEGASUS_DEBUG
|
308 karl 1.60 endif
309
|
310 chuck 1.42 # compile in the experimental APIs
|
311 david.dillard 1.65 DEFINES += -DPEGASUS_USE_EXPERIMENTAL_INTERFACES
|
312 chuck 1.42
|
313 w.white 1.57 # Set compile flag to control compilation of CIMOM statistics
314 ifdef PEGASUS_HAS_PERFINST
|
315 david.dillard 1.65 FLAGS += -DPEGASUS_HAS_PERFINST
|
316 w.white 1.57 endif
|
317 kumpf 1.56
318 ############################################################
319 #
320 # Set any vendor-specific compile flags
321 #
322 ############################################################
323
324 ifdef PEGASUS_VENDOR_HP
|
325 david.dillard 1.65 DEFINES+= -DPEGASUS_VENDOR_HP
|
326 kumpf 1.56 endif
327
|
328 karl 1.36
|
329 karl 1.17 ############################################################
330 #
331 # Set up other Make Variables that depend on platform config files
332 #
333 ############################################################
334
335 # This is temporary until we end up with a better place to
336 # put this variable
337 # Makefiles can do directory remove with
338 # $(RMREPOSITORY) repositoryname
339 #
340 RMREPOSITORY = $(RMDIRHIER)
341
|
342 w.otsuka 1.63 ifdef PEGASUS_USE_RELEASE_CONFIG_OPTIONS
|
343 david.dillard 1.65 FLAGS += -DPEGASUS_USE_RELEASE_CONFIG_OPTIONS
|
344 w.otsuka 1.62 endif
345
346 ifdef PEGASUS_USE_RELEASE_DIRS
|
347 david.dillard 1.65 FLAGS += -DPEGASUS_USE_RELEASE_DIRS
|
348 w.otsuka 1.62 endif
|
349 mday 1.27
|
350 kumpf 1.64 # Unless otherwise specified, Pegasus libraries go in $(PEGASUS_HOME)/lib
351 ifndef PEGASUS_DEST_LIB_DIR
|
352 david.dillard 1.65 PEGASUS_DEST_LIB_DIR = lib
|
353 kumpf 1.64 endif
|
354 mday 1.28
|
355 kumpf 1.64 DEFINES += -DPEGASUS_DEST_LIB_DIR=\"$(PEGASUS_DEST_LIB_DIR)\"
|