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