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.67 -DTHREAD_SAFE -D_REENTRANT -Werror=unused-variable -Wno-unused-function
|
101 dev.meetei 1.62 else
|
102 marek 1.65 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 dl.meetei 1.67 FLAGS += -Werror=unused-variable
|
107 marek 1.65 endif
108 FLAGS += -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT
|
109 dev.meetei 1.62 endif
|
110 marek 1.65
111
|
112 mike 1.49 ##==============================================================================
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 dev.meetei 1.62 ifeq ($(COMPILER), gnu)
|
128 dl.meetei 1.70 # disable the strict aliasing
|
129 dl.meetei 1.68 ifeq ($(shell expr $(GCC_VERSION) '>=' 3.0), 1)
|
130 dl.meetei 1.71 PEGASUS_EXTRA_CXX_FLAGS += -fno-enforce-eh-specs -fno-strict-aliasing
|
131 dl.meetei 1.68 endif
|
132 dev.meetei 1.62 endif
133
|
134 karl 1.26 ifdef PEGASUS_OPTIMIZE_FOR_SIZE
|
135 dl.meetei 1.68 ifeq ($(COMPILER), gnu)
136 FLAGS += -Os
137 else
138 FLAGS += -Oz
139 endif
|
140 karl 1.26 else
141 FLAGS += -O2
142 endif
|
143 kumpf 1.7 endif
144
|
145 w.otsuka 1.41 FLAGS += $(CXX_MACHINE_OPTIONS)
146
|
147 dave.sudlik 1.44 ifdef PEGASUS_ENABLE_GCOV
148 FLAGS += -ftest-coverage -fprofile-arcs
149 SYS_LIBS += -lgcc -lgcov
150 EXTRA_LIBRARIES += -lgcc -lgcov
151 endif
152
|
153 kumpf 1.7 ifndef PEGASUS_USE_MU_DEPEND
154 PEGASUS_HAS_MAKEDEPEND = yes
155 endif
156
|
157 mike 1.48 ##==============================================================================
158 ##
|
159 kumpf 1.61 ## Set the default visibility symbol to hidden for shared libraries. This
|
160 mike 1.48 ## feature is only available in GCC 4.0 and later.
161 ##
162 ##==============================================================================
163
|
164 dev.meetei 1.62 ifeq ($(COMPILER), gnu)
|
165 dl.meetei 1.68 ifeq ($(shell expr $(GCC_VERSION) '>=' 4.0), 1)
|
166 kumpf 1.61 FLAGS += -fvisibility=hidden
|
167 dl.meetei 1.68 endif
|
168 dev.meetei 1.62 else
169 FLAGS +=-fvisibility=hidden
170 endif
|
171 mike 1.48
|
172 w.otsuka 1.47 ifndef PEGASUS_ARCH_LIB
|
173 dl.meetei 1.68 ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_GNU)
|
174 w.otsuka 1.47 PEGASUS_ARCH_LIB = lib64
|
175 dl.meetei 1.68 endif
176 ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_CLANG)
|
177 dev.meetei 1.62 PEGASUS_ARCH_LIB = lib64
|
178 dl.meetei 1.68 endif
179 PEGASUS_ARCH_LIB = lib
|
180 w.otsuka 1.47 endif
181 DEFINES += -DPEGASUS_ARCH_LIB=\"$(PEGASUS_ARCH_LIB)\"
|