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

  1 martin 1.59 #//%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.60 #//
  3 martin 1.59 #// Licensed to The Open Group (TOG) under one or more contributor license
  4             #// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             #// this work for additional information regarding copyright ownership.
  6             #// Each contributor licenses this file to you under the OpenPegasus Open
  7             #// Source License; you may not use this file except in compliance with the
  8             #// License.
  9 martin 1.60 #//
 10 martin 1.59 #// Permission is hereby granted, free of charge, to any person obtaining a
 11             #// copy of this software and associated documentation files (the "Software"),
 12             #// to deal in the Software without restriction, including without limitation
 13             #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             #// and/or sell copies of the Software, and to permit persons to whom the
 15             #// Software is furnished to do so, subject to the following conditions:
 16 martin 1.60 #//
 17 martin 1.59 #// The above copyright notice and this permission notice shall be included
 18             #// in all copies or substantial portions of the Software.
 19 martin 1.60 #//
 20 martin 1.59 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.60 #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.59 #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.60 #//
 28 martin 1.59 #//////////////////////////////////////////////////////////////////////////
 29 kumpf  1.7  # Configuration options for Pegasus on all architectures running Linux
 30 dev.meetei 1.62 # These options are also used by clang( which was designed as dropin
 31                 # replacement for gcc). So some of the names are misleading like 
 32                 # PEGASUS_PLATFORM_LINUX_GENERIC_GNU due to GNU appended, Better will
 33                 # be PEGASUS_PLATFORM_LINUX_GENERIC and GNU and CLANG can add it. 
 34                 # Changing this now(for 9236) will involve lot of work, Will take up 
 35                 # this work later. 
 36                 
 37 kumpf      1.7  
 38                 include $(ROOT)/mak/config-unix.mak
 39                 
 40                 PEGASUS_PLATFORM_LINUX_GENERIC_GNU = 1
 41                 DEFINES += -DPEGASUS_PLATFORM_LINUX_GENERIC_GNU
 42                 DEFINES += -DPEGASUS_PLATFORM_$(PEGASUS_PLATFORM)
 43                 
 44 jim.wunderlich 1.38 #########################################################################
 45                     ##
 46                     ## Platform specific compile options controlled by environment variables
 47 kumpf          1.61 ## are set here.
 48 jim.wunderlich 1.38 ##
 49                     #########################################################################
 50                     
 51                     
 52                     # Enable OOP by default if preference not already set in the environment
 53                     #
 54 jim.wunderlich 1.39 ifndef PEGASUS_DEFAULT_ENABLE_OOP
 55                     PEGASUS_DEFAULT_ENABLE_OOP = true
 56 jim.wunderlich 1.38 endif
 57                     
 58                     
 59 konrad.r       1.27 # Enable CMPI by default.
 60                     #
 61 denise.eckstein 1.45 ifndef PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER
 62 denise.eckstein 1.46 PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=true
 63 denise.eckstein 1.45 endif
 64 konrad.r        1.27 
 65 jim.wunderlich  1.38 #########################################################################
 66                      
 67 kumpf           1.7  OS = linux
 68                      
 69 dev.meetei      1.62 
 70                      ifeq ($(findstring _CLANG, $(PEGASUS_PLATFORM)), _CLANG)
 71                          COMPILER = clang
 72                          CXX = clang++
 73                          CC = clang
 74                      else
 75                          COMPILER = gnu
 76                          ifndef CXX
 77                              CXX = g++
 78                          endif
 79                      endif
 80 kumpf           1.7  
 81                      PLATFORM_VERSION_SUPPORTED = yes
 82                      
 83                      
 84                      SH = sh
 85                      
 86 david.dillard   1.30 YACC = bison
 87 kumpf           1.7  
 88                      PEGASUS_SUPPORTS_DYNLIB = yes
 89                      
 90                      MAJOR_VERSION_NUMBER = 1
 91                      
 92                      LIB_SUFFIX = .so.$(MAJOR_VERSION_NUMBER)
 93                      
 94 kumpf           1.11 DEFINES += -DPEGASUS_USE_SYSLOGS
 95                      
 96 mike            1.49 SYS_LIBS = -ldl -lpthread -lcrypt
 97 kumpf           1.7  
 98 dev.meetei      1.62 ifeq ($(COMPILER), clang)
 99                          FLAGS += -W -Wall -Wno-unused-parameter  -Wno-unused-value -D_GNU_SOURCE \
100 karl            1.72         -DTHREAD_SAFE -D_REENTRANT -Werror=unused-variable -Wno-unused-function \
101                              -Werror=switch
102 dev.meetei      1.62 else
103 marek           1.65     FLAGS += -W -Wall -Wno-unused -Wunused-variable
104                        # Starting with gcc 4.3 specific warnings can be reported as error
105                        # Enabling a specific selection of warnings to turn into errors
106                        ifeq ($(shell expr $(GCC_VERSION) '>=' 4.3), 1)
107 dl.meetei       1.67     FLAGS += -Werror=unused-variable
108 karl            1.72     FLAGS += -Werror=switch
109                         endif
110 marek           1.65     FLAGS += -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT
111 dev.meetei      1.62 endif
112 marek           1.65 
113                      
114 mike            1.49 ##==============================================================================
115                      ##
116                      ## The DYNAMIC_FLAGS variable defines linker flags that only apply to shared
117                      ## libraries.
118                      ##
119                      ##==============================================================================
120                      DYNAMIC_FLAGS += -fPIC
121 kumpf           1.7  
122 kumpf           1.61 ifdef PEGASUS_USE_DEBUG_BUILD_OPTIONS
123 mike            1.43   FLAGS += -g
124 kumpf           1.7  else
125 mike            1.43   #
126                        # The -fno-enforce-eh-specs is not available in 2.9.5 and it probably
127                        # appeared in the 3.0 series of compilers.
128                        #
129 dev.meetei      1.62   ifeq ($(COMPILER), gnu)
130 dl.meetei       1.70    # disable the strict aliasing
131 dl.meetei       1.68    ifeq ($(shell expr $(GCC_VERSION) '>=' 3.0), 1)
132 dl.meetei       1.71      PEGASUS_EXTRA_CXX_FLAGS += -fno-enforce-eh-specs -fno-strict-aliasing
133 dl.meetei       1.68    endif
134 dev.meetei      1.62   endif
135                            
136 karl            1.26   ifdef PEGASUS_OPTIMIZE_FOR_SIZE
137 dl.meetei       1.68     ifeq ($(COMPILER), gnu)
138                            FLAGS += -Os
139                          else
140                            FLAGS += -Oz
141                          endif
142 karl            1.26   else
143                          FLAGS += -O2
144                        endif
145 kumpf           1.7  endif
146                      
147 w.otsuka        1.41 FLAGS += $(CXX_MACHINE_OPTIONS)
148                      
149 dave.sudlik     1.44 ifdef PEGASUS_ENABLE_GCOV
150                        FLAGS += -ftest-coverage -fprofile-arcs
151                        SYS_LIBS += -lgcc -lgcov
152                        EXTRA_LIBRARIES += -lgcc -lgcov
153                      endif
154                      
155 kumpf           1.7  ifndef PEGASUS_USE_MU_DEPEND
156                      PEGASUS_HAS_MAKEDEPEND = yes
157                      endif
158                      
159 mike            1.48 ##==============================================================================
160                      ##
161 kumpf           1.61 ## Set the default visibility symbol to hidden for shared libraries. This
162 mike            1.48 ## feature is only available in GCC 4.0 and later.
163                      ##
164                      ##==============================================================================
165                      
166 dev.meetei      1.62 ifeq ($(COMPILER), gnu)
167 dl.meetei       1.68  ifeq ($(shell expr $(GCC_VERSION) '>=' 4.0), 1)
168 kumpf           1.61     FLAGS += -fvisibility=hidden
169 dl.meetei       1.68  endif
170 dev.meetei      1.62 else
171                          FLAGS +=-fvisibility=hidden	
172                      endif
173 mike            1.48 
174 w.otsuka        1.47 ifndef PEGASUS_ARCH_LIB
175 dl.meetei       1.68   ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_GNU)
176 w.otsuka        1.47         PEGASUS_ARCH_LIB = lib64
177 dl.meetei       1.68   endif
178                        ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_CLANG)
179 dev.meetei      1.62         PEGASUS_ARCH_LIB = lib64
180 dl.meetei       1.68   endif
181                        PEGASUS_ARCH_LIB = lib
182 w.otsuka        1.47 endif
183                      DEFINES += -DPEGASUS_ARCH_LIB=\"$(PEGASUS_ARCH_LIB)\"

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2