(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 karl   1.61.8.1 # 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 karl            1.61.8.1 
 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 karl            1.61.8.1 ifeq ($(COMPILER), clang)
 99                              FLAGS += -W -Wall -Wno-unused-parameter  -Wno-unused-value -D_GNU_SOURCE \
100                                  -DTHREAD_SAFE -D_REENTRANT -Werror=unused-variable -Wno-unused-function
101                          else
102                              FLAGS += -W -Wall -Wno-unused -Wunused-variable
103                            # Starting with gcc 4.3 specific warnings can be reported as error
104                            # Enabling a specific selection of warnings to turn into errors
105                            ifeq ($(shell expr $(GCC_VERSION) '>=' 4.3), 1)
106                              FLAGS += -Werror=unused-variable
107                            endif
108                              FLAGS += -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT
109                          endif
110                          
111 mike            1.49     
112                          ##==============================================================================
113                          ##
114                          ## The DYNAMIC_FLAGS variable defines linker flags that only apply to shared
115                          ## libraries.
116                          ##
117                          ##==============================================================================
118                          DYNAMIC_FLAGS += -fPIC
119 kumpf           1.7      
120 kumpf           1.61     ifdef PEGASUS_USE_DEBUG_BUILD_OPTIONS
121 mike            1.43       FLAGS += -g
122 kumpf           1.7      else
123 mike            1.43       #
124                            # The -fno-enforce-eh-specs is not available in 2.9.5 and it probably
125                            # appeared in the 3.0 series of compilers.
126                            #
127 karl            1.61.8.1   ifeq ($(COMPILER), gnu)
128                             ifeq ($(shell expr $(GCC_VERSION) '>=' 3.0), 1)
129                               EXTRA_CXX_FLAGS += -fno-enforce-eh-specs
130                             endif
131 mike            1.43       endif
132 karl            1.61.8.1       
133 karl            1.26       ifdef PEGASUS_OPTIMIZE_FOR_SIZE
134 karl            1.61.8.1     ifeq ($(COMPILER), gnu)
135                                FLAGS += -Os
136                              else
137                                FLAGS += -Oz
138                              endif
139 karl            1.26       else
140                              FLAGS += -O2
141                            endif
142 kumpf           1.7      endif
143                          
144 w.otsuka        1.41     FLAGS += $(CXX_MACHINE_OPTIONS)
145                          
146 dave.sudlik     1.44     ifdef PEGASUS_ENABLE_GCOV
147                            FLAGS += -ftest-coverage -fprofile-arcs
148                            SYS_LIBS += -lgcc -lgcov
149                            EXTRA_LIBRARIES += -lgcc -lgcov
150                          endif
151                          
152 kumpf           1.7      ifndef PEGASUS_USE_MU_DEPEND
153                          PEGASUS_HAS_MAKEDEPEND = yes
154                          endif
155                          
156 mike            1.48     ##==============================================================================
157                          ##
158 kumpf           1.61     ## Set the default visibility symbol to hidden for shared libraries. This
159 mike            1.48     ## feature is only available in GCC 4.0 and later.
160                          ##
161                          ##==============================================================================
162                          
163 karl            1.61.8.1 ifeq ($(COMPILER), gnu)
164                           ifeq ($(shell expr $(GCC_VERSION) '>=' 4.0), 1)
165 kumpf           1.61         FLAGS += -fvisibility=hidden
166 karl            1.61.8.1  endif
167                          else
168                              FLAGS +=-fvisibility=hidden	
169 mike            1.48     endif
170                          
171 w.otsuka        1.47     ifndef PEGASUS_ARCH_LIB
172 karl            1.61.8.1   ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_GNU)
173 w.otsuka        1.47             PEGASUS_ARCH_LIB = lib64
174 karl            1.61.8.1   endif
175                            ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_CLANG)
176                                  PEGASUS_ARCH_LIB = lib64
177                            endif
178                            PEGASUS_ARCH_LIB = lib
179 w.otsuka        1.47     endif
180                          DEFINES += -DPEGASUS_ARCH_LIB=\"$(PEGASUS_ARCH_LIB)\"

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2