~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to .pc/10-debug-flags.patch/cpp/config/Make.rules.Linux

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# **********************************************************************
 
2
#
 
3
# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
 
4
#
 
5
# This copy of Ice is licensed to you under the terms described in the
 
6
# ICE_LICENSE file included in this distribution.
 
7
#
 
8
# **********************************************************************
 
9
 
 
10
#
 
11
# This file is included by Make.rules when uname is Linux.
 
12
#
 
13
 
 
14
USE_SPARC_ASM           = irrelevant
 
15
MACHINE                 = $(shell uname -m)
 
16
SUSE_i586               = $(shell grep i586 /etc/SuSE-release 2>/dev/null)
 
17
 
 
18
ifneq ($(shell grep 'release 4' /etc/redhat-release 2>/dev/null),)
 
19
   NPTL_LIB             = -L/usr/$(libsubdir)/nptl
 
20
   NPTL_FLAGS           = -I/usr/include/nptl
 
21
endif
 
22
 
 
23
#
 
24
# Default compiler is c++ (aka g++).
 
25
#
 
26
ifeq ($(CXX),)
 
27
   CXX                  = c++
 
28
endif
 
29
 
 
30
ifeq ($(CXX),g++)
 
31
   CXX                  = c++
 
32
endif
 
33
 
 
34
ifeq ($(CXX),c++)
 
35
 
 
36
    ifneq ($(SUSE_i586),)
 
37
        CXXARCHFLAGS    += -march=i586
 
38
    endif
 
39
 
 
40
   ifeq ($(MACHINE),sparc64)
 
41
      #
 
42
      # We are an ultra, at least, and so have the atomic instructions
 
43
      #
 
44
      $(warning ===================================================================) 
 
45
      $(warning Linux on SPARC is currently unsupported. The Ice team does not)
 
46
      $(warning maintain SPARC specific portions of the source code or build)
 
47
      $(warning system. Contact sales@zeroc.com if you wish to sponsor official)
 
48
      $(warning support.)
 
49
      $(warning ===================================================================) 
 
50
      USE_SPARC_ASM     = yes
 
51
      CXXARCHFLAGS      += -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM
 
52
   endif
 
53
 
 
54
   ifeq ($(MACHINE),sparc)
 
55
      #
 
56
      # We are a sun4m or sun4c
 
57
      # On sun4m, there is a bug in some CPU/kernel/gcc configurations which
 
58
      # prevent us from using '-mcpu=v8'
 
59
      #
 
60
      $(warning ===================================================================) 
 
61
      $(warning Linux on SPARC is currently unsupported. The Ice team does not)
 
62
      $(warning maintain SPARC specific portions of the source code or build)
 
63
      $(warning system. Contact sales@zeroc.com if you wish to sponsor official)
 
64
      $(warning support.)
 
65
      $(warning ===================================================================) 
 
66
      USE_SPARC_ASM     = no
 
67
      CXXARCHFLAGS      += -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED
 
68
   endif
 
69
 
 
70
   ifeq ($(MACHINE),x86_64)
 
71
      ifeq ($(LP64),yes)
 
72
         CXXARCHFLAGS   += -m64
 
73
      else
 
74
         CXXARCHFLAGS   += -m32
 
75
      endif
 
76
   endif
 
77
 
 
78
   CXXFLAGS             = $(CXXARCHFLAGS) -Wall -D_REENTRANT
 
79
 
 
80
   ifneq ($(GENPIC),no)
 
81
      CXXFLAGS          += -fPIC
 
82
   endif
 
83
 
 
84
   ifeq ($(OPTIMIZE),yes)
 
85
      CXXFLAGS          += -O2 -DNDEBUG
 
86
   else
 
87
      CXXFLAGS          += -g 
 
88
   endif
 
89
 
 
90
   #
 
91
   # C++ run-time libraries, necessary for linking some shared libraries.
 
92
   #
 
93
   CXXLIBS              =
 
94
 
 
95
   mkshlib              = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread -lrt
 
96
 
 
97
   mklib                = ar cr $(1) $(2)
 
98
 
 
99
   rpathlink            = -Wl,-rpath-link,$(1) 
 
100
 
 
101
   ifneq ($(embedded_runpath_prefix),)
 
102
      LDPLATFORMFLAGS      = -Wl,--enable-new-dtags -Wl,-rpath,$(runpath_libdir)
 
103
   else
 
104
      LDPLATFORMFLAGS      = -Wl,--enable-new-dtags
 
105
   endif
 
106
 
 
107
   LDPLATFORMFLAGS      += -rdynamic
 
108
 
 
109
endif
 
110
 
 
111
ifeq ($(CXX),icpc)
 
112
   $(warning ===================================================================) 
 
113
   $(warning Intel C++ is currently not supported. The Ice team does not)
 
114
   $(warning maintain Intel C++ specific portions of the source code or build)
 
115
   $(warning system.  Contact sales@zeroc.com if you wish to sponsor official)
 
116
   $(warning support.)
 
117
   $(warning ===================================================================) 
 
118
   CXXFLAGS             = -D_REENTRANT    
 
119
 
 
120
   ifneq ($(GENPIC),no)
 
121
      CXXFLAGS          += -fPIC
 
122
   endif
 
123
 
 
124
   ifeq ($(OPTIMIZE),yes)
 
125
      CXXFLAGS          += -O2 -DNDEBUG
 
126
   else
 
127
      CXXFLAGS          += -g
 
128
   endif
 
129
 
 
130
   #
 
131
   # C++ run-time libraries, necessary for linking some shared libraries.
 
132
   #
 
133
   CXXLIBS              =
 
134
 
 
135
   mkshlib              = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread -lrt
 
136
 
 
137
   mklib                = ar cr $(1) $(2)
 
138
 
 
139
   rpathlink            = -Wl,-rpath-link,$(1) 
 
140
 
 
141
endif
 
142
 
 
143
BASELIBS                = -lIceUtil -lpthread -lrt
 
144
ifneq ($(NPTL_LIB),)
 
145
    CXXFLAGS            += $(NPTL_FLAGS)
 
146
    BASELIBS            := $(NPTL_LIB) $(BASELIBS)
 
147
endif
 
148
 
 
149
LIBS                    = $(BZIP2_RPATH_LINK) -lIce $(BASELIBS)
 
150
 
 
151
ifneq ($(QT_HOME),)
 
152
   QT_FLAGS             = -I$(QT_HOME)
 
153
   QT_LIBS              = -lQtCore -lQtSql
 
154
   QT_RPATH_LINK        = $(call rpathlink,$(QT_HOME)/$(libsubdir))
 
155
endif
 
156
 
 
157
ICEUTIL_OS_LIBS         = 
 
158
ICE_OS_LIBS             = -ldl
 
159
 
 
160
PLATFORM_HAS_READLINE   = yes
 
161