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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2