xref: /aoo41x/main/solenv/inc/unxbsdi2.mk (revision 7871dc3e)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24# mk file for unxbsdi2
25ASM=
26AFLAGS=
27
28SOLAR_JAVA=TRUE
29JAVAFLAGSDEBUG=-g
30
31# filter for supressing verbose messages from linker
32#not needed at the moment
33#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
34
35# _PTHREADS is needed for the stl
36CDEFS+= -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
37
38# this is a platform with JAVA support
39.IF "$(SOLAR_JAVA)"!=""
40JAVADEF=-DSOLAR_JAVA
41.IF "$(debug)"==""
42JAVA_RUNTIME=-ljava
43.ELSE
44JAVA_RUNTIME=-ljava_g
45.ENDIF
46.ENDIF
47
48# architecture dependent flags for the C and C++ compiler that can be changed by
49# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
50ARCH_FLAGS*=
51
52# name of C++ Compiler
53CXX*=g++
54# name of C Compiler
55CC*=gcc
56# flags for C and C++ Compiler
57CFLAGS+=-fmessage-length=0 -c
58
59# flags to enable build with symbols; required for crashdump feature
60.IF "$(ENABLE_SYMBOLS)"=="SMALL"
61CFLAGSENABLESYMBOLS=-g1
62.ELSE
63CFLAGSENABLESYMBOLS=-g
64.ENDIF
65
66# flags for the C++ Compiler
67CFLAGSCC= -pipe $(ARCH_FLAGS)
68# Flags for enabling exception handling
69CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
70# Flags for disabling exception handling
71CFLAGS_NO_EXCEPTIONS=-fno-exceptions
72
73CFLAGSCXX= -pipe -frtti $(ARCH_FLAGS)
74PICSWITCH:=-fpic
75
76# Compiler flags for compiling static object in multi threaded environment with graphical user interface
77CFLAGSOBJGUIMT=
78# Compiler flags for compiling static object in multi threaded environment with character user interface
79CFLAGSOBJCUIMT=
80# Compiler flags for compiling shared object in multi threaded environment with graphical user interface
81CFLAGSSLOGUIMT=$(PICSWITCH)
82# Compiler flags for compiling shared object in multi threaded environment with character user interface
83CFLAGSSLOCUIMT=$(PICSWITCH)
84# Compiler flags for profiling
85CFLAGSPROF=
86# Compiler flags for debugging
87CFLAGSDEBUG=-g
88CFLAGSDBGUTIL=
89# Compiler flags for enabling optimizations
90# CFLAGSOPT=-O2
91# reduce to -O1 to avoid optimization problems
92CFLAGSOPT=-O1
93# Compiler flags for disabling optimizations
94CFLAGSNOOPT=-O
95# Compiler flags for describing the output path
96CFLAGSOUTOBJ=-o
97
98CFLAGSWARNCC=
99CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
100# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
101CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
102CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
103CFLAGSWERRCC=-Werror
104
105# switches for dynamic and static linking
106STATIC		= -Wl,-Bstatic
107DYNAMIC		= -Wl,-Bdynamic
108
109# name of linker
110LINK*=$(CC)
111
112# default linker flags
113LINKFLAGSDEFS*=-z defs
114LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
115LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
116    #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
117LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
118LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\'
119LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
120LINKFLAGSRUNPATH_OXT=
121LINKFLAGSRUNPATH_NONE=
122LINKFLAGS=-z combreloc $(LINKFLAGSDEFS)
123
124# linker flags for linking applications
125LINKFLAGSAPPGUI= -Wl,-export-dynamic
126LINKFLAGSAPPCUI= -Wl,-export-dynamic
127
128# linker flags for linking shared libraries
129LINKFLAGSSHLGUI= -shared
130LINKFLAGSSHLCUI= -shared
131
132LINKFLAGSTACK=
133LINKFLAGSPROF=
134LINKFLAGSDEBUG=-g
135LINKFLAGSOPT=
136
137# linker flags for optimization (symbol hashtable)
138# for now, applied to symbol scoped libraries, only
139LINKFLAGSOPTIMIZE*=-Wl,-O1
140LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
141
142SONAME_SWITCH=-Wl,-h
143
144# Sequence of libs does matter !
145
146STDLIBCPP=-lstdc++
147
148# default objectfilenames to link
149STDOBJGUI=
150STDSLOGUI=
151STDOBJCUI=
152STDSLOCUI=
153
154# libraries for linking applications
155STDLIBGUIMT=-lX11 -lpthread -lm
156STDLIBCUIMT=-lpthread -lm
157# libraries for linking shared libraries
158STDSHLGUIMT=-lX11 -lXext -lpthread -lm
159STDSHLCUIMT=-lpthread -lm
160
161LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
162
163.IF "$(STLPORT_VER)" >= "500"
164LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
165LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
166.ELSE
167LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
168LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
169.ENDIF
170
171#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
172
173# name of library manager
174LIBMGR=ar
175LIBFLAGS=-r
176
177# tool for generating import libraries
178IMPLIB=
179IMPLIBFLAGS=
180
181MAPSYM=
182MAPSYMFLAGS=
183
184RC=irc
185RCFLAGS=-fo$@ $(RCFILES)
186RCLINK=
187RCLINKFLAGS=
188RCSETVERSION=
189
190# platform specific identifier for shared libs
191DLLPOSTFIX=
192DLLPRE=lib
193DLLPOST=.so
194
195