1
# **********************************************************************
3
# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
5
# This copy of Ice is licensed to you under the terms described in the
6
# ICE_LICENSE file included in this distribution.
8
# **********************************************************************
11
# This file is included by Make.rules when uname is Linux.
14
USE_SPARC_ASM = irrelevant
15
MACHINE = $(shell uname -m)
16
SUSE_i586 = $(shell grep i586 /etc/SuSE-release 2>/dev/null)
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
24
# Default compiler is c++ (aka g++).
37
CXXARCHFLAGS += -march=i586
40
ifeq ($(MACHINE),sparc64)
42
# We are an ultra, at least, and so have the atomic instructions
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)
49
$(warning ===================================================================)
51
CXXARCHFLAGS += -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM
54
ifeq ($(MACHINE),sparc)
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'
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)
65
$(warning ===================================================================)
67
CXXARCHFLAGS += -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED
70
ifeq ($(MACHINE),x86_64)
78
CXXFLAGS = $(CXXARCHFLAGS) -Wall -D_REENTRANT
84
ifeq ($(OPTIMIZE),yes)
85
CXXFLAGS += -O2 -DNDEBUG
91
# C++ run-time libraries, necessary for linking some shared libraries.
95
mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread -lrt
97
mklib = ar cr $(1) $(2)
99
rpathlink = -Wl,-rpath-link,$(1)
101
ifneq ($(embedded_runpath_prefix),)
102
LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(runpath_libdir)
104
LDPLATFORMFLAGS = -Wl,--enable-new-dtags
107
LDPLATFORMFLAGS += -rdynamic
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)
117
$(warning ===================================================================)
118
CXXFLAGS = -D_REENTRANT
124
ifeq ($(OPTIMIZE),yes)
125
CXXFLAGS += -O2 -DNDEBUG
131
# C++ run-time libraries, necessary for linking some shared libraries.
135
mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread -lrt
137
mklib = ar cr $(1) $(2)
139
rpathlink = -Wl,-rpath-link,$(1)
143
BASELIBS = -lIceUtil -lpthread -lrt
145
CXXFLAGS += $(NPTL_FLAGS)
146
BASELIBS := $(NPTL_LIB) $(BASELIBS)
149
LIBS = $(BZIP2_RPATH_LINK) -lIce $(BASELIBS)
152
QT_FLAGS = -I$(QT_HOME)
153
QT_LIBS = -lQtCore -lQtSql
154
QT_RPATH_LINK = $(call rpathlink,$(QT_HOME)/$(libsubdir))
160
PLATFORM_HAS_READLINE = yes