(file) Return to config.mak CVS log (file) (dir) Up to [Pegasus] / pegasus / mak

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2