1#
2# x86_sosV_5.5.mk - make variables and rules specific to Solaris 2.5.
3#
4
5SunOS = 1
6x86Processor = 1
7
8
9#
10# Python set-up
11#
12# You must set a path to a Python 1.5.2 interpreter.
13
14#PYTHON = /usr/local/bin/python
15
16
17#
18# Include general unix things
19#
20
21include $(THIS_IMPORT_TREE)/mk/unix.mk
22
23
24#
25# C preprocessor macro definitions for this architecture
26#
27
28IMPORT_CPPFLAGS += -D__x86__ -D__sunos__ -D__OSVERSION__=5
29
30
31#
32# Standard programs
33#
34
35AR = ar cq
36
37MKDIRHIER = mkdirhier
38INSTALL           = $(BASE_OMNI_TREE)/bin/scripts/install-sh -c
39
40CPP = /usr/ccs/lib/cpp
41
42CXX = CC
43CXXMAKEDEPEND += -D__SUNPRO_CC -D__cplusplus
44CXXDEBUGFLAGS = -O2
45CXXMTFLAG     = -mt
46
47CXXLINK		= $(CXX)
48CXXLINKOPTIONS  = $(CXXDEBUGFLAGS) $(CXXOPTIONS)
49
50# CXXLINKOPTIONS += $(patsubst %,-R %,$(IMPORT_LIBRARY_DIRS))
51# Note: the -R linker option in CXXLINKOPTIONS instruct the Sun linker to
52# record the pathname of the shared libraries in the executable.
53
54#
55# To use gcc uncomment the following lines:
56#
57#CPP = gcc
58#
59#CXX = g++
60#CXXMAKEDEPEND += -D__cplusplus -D__GNUG__ -D__GNUC__
61#CXXDEBUGFLAGS =
62#CXXOPTIONS    =  -fhandle-exceptions -Wall -Wno-unused
63#CXXMTFLAG     =
64#
65#CXXLINK		= $(CXX)
66#CXXLINKOPTIONS  = $(CXXDEBUGFLAGS) $(CXXOPTIONS)
67#
68# CXXLINKOPTIONS += $(patsubst %,-R %,$(IMPORT_LIBRARY_DIRS))
69# Note: the -R linker option in CXXLINKOPTIONS instruct the Sun linker to
70# record the pathname of the shared libraries in the executable.
71
72CC                = gcc
73CMAKEDEPEND       += -D__GNUC__
74CDEBUGFLAGS       = -O
75COPTIONS	  = -fpcc-struct-return
76
77CLINK             = $(CC)
78
79
80#
81# Socket library
82#
83
84SOCKET_LIB = -lsocket -lnsl
85THREAD_LIB = -lthread $(CXXMTFLAG)
86
87
88#
89# CORBA stuff
90#
91
92CorbaImplementation = OMNIORB
93
94#
95# OMNI thread stuff
96#
97
98Solaris_OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread) \
99			 -lthread -lposix4 $(CXXMTFLAG)
100Solaris_OMNITHREAD_CPPFLAGS = -D_REENTRANT $(CXXMTFLAG)
101
102Posix_OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread) -lpthread \
103		 -lposix4 $(CXXMTFLAG)
104Posix_OMNITHREAD_CPPFLAGS = -DUsePthread -D_REENTRANT $(CXXMTFLAG)
105OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10 \
106			    -DPthreadSupportThreadPriority
107
108OMNITHREAD_LIB = $($(ThreadSystem)_OMNITHREAD_LIB)
109OMNITHREAD_CPPFLAGS = $($(ThreadSystem)_OMNITHREAD_CPPFLAGS)
110
111ThreadSystem = Posix
112
113lib_depend := $(patsubst %,$(LibPattern),omnithread)
114OMNITHREAD_LIB_DEPEND := $(GENERATE_LIB_DEPEND)
115
116
117# Default location of the omniORB configuration file [falls back to this if
118# the environment variable OMNIORB_CONFIG is not set] :
119
120OMNIORB_CONFIG_DEFAULT_LOCATION = /etc/omniORB.cfg
121
122# Default directory for the omniNames log files.
123OMNINAMES_LOG_DEFAULT_LOCATION = /var/omninames
124
125#
126# Shared Library support.
127#
128# Platform specific customerisation.
129# everything else is default from unix.mk
130#
131ifeq ($(notdir $(CXX)),CC)
132
133BuildSharedLibrary = 1       # Enable
134
135SHAREDLIB_CPPFLAGS = -KPIC
136
137SharedLibraryPlatformLinkFlagsTemplate = -G -h $$soname
138
139ifeq ($(notdir $(CC)),gcc)
140SHAREDLIB_CFLAGS = -fPIC
141endif
142
143endif
144
145ifeq ($(notdir $(CXX)),g++)
146
147BuildSharedLibrary = 1       # Enable
148
149SHAREDLIB_CPPFLAGS = -fPIC
150
151SharedLibraryPlatformLinkFlagsTemplate = -shared -Wl,-h,$$soname
152
153endif
154