xref: /aoo41x/main/solenv/inc/unxbsdi.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 unxbsdi
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*=-mpentiumpro
55
56# name of C++ Compiler
57CXX*=g++
58# name of C Compiler
59CC*=gcc
60# flags for C and C++ Compiler
61CFLAGS+=-c
62# flags for the C++ Compiler
63CFLAGSCC= -pipe $(ARCH_FLAGS)
64# Flags for enabling exception handling
65CFLAGSEXCEPTIONS=-fexceptions
66# Flags for disabling exception handling
67CFLAGS_NO_EXCEPTIONS=-fno-exceptions
68
69CFLAGSCXX= -pipe -frtti $(ARCH_FLAGS)
70PICSWITCH:=-fpic
71
72# Compiler flags for compiling static object in multi threaded environment with graphical user interface
73CFLAGSOBJGUIMT=
74# Compiler flags for compiling static object in multi threaded environment with character user interface
75CFLAGSOBJCUIMT=
76# Compiler flags for compiling shared object in multi threaded environment with graphical user interface
77CFLAGSSLOGUIMT=$(PICSWITCH)
78# Compiler flags for compiling shared object in multi threaded environment with character user interface
79CFLAGSSLOCUIMT=$(PICSWITCH)
80# Compiler flags for profiling
81CFLAGSPROF=
82# Compiler flags for debugging
83CFLAGSDEBUG=-g
84CFLAGSDBGUTIL=
85# Compiler flags for enabling optimizations
86CFLAGSOPT=-O2
87# Compiler flags for disabling optimizations
88CFLAGSNOOPT=-O
89# Compiler flags for describing the output path
90CFLAGSOUTOBJ=-o
91
92CFLAGSWARNCC=
93CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
94# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
95CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
96CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
97CFLAGSWERRCC=-Werror
98
99# switches for dynamic and static linking
100STATIC		= -Wl,-Bstatic
101DYNAMIC		= -Wl,-Bdynamic
102
103# name of linker
104LINK*=gcc
105# default linker flags
106LINKFLAGS=
107
108# linker flags for linking applications
109LINKFLAGSAPPGUI= -Wl,-export-dynamic
110LINKFLAGSAPPCUI= -Wl,-export-dynamic
111
112# linker flags for linking shared libraries
113LINKFLAGSSHLGUI= -shared
114LINKFLAGSSHLCUI= -shared
115
116LINKFLAGSTACK=
117LINKFLAGSPROF=
118LINKFLAGSDEBUG=-g
119LINKFLAGSOPT=
120
121.IF "$(NO_BSYMBOLIC)"==""
122.IF "$(PRJNAME)" != "envtest"
123LINKFLAGSSHLGUI+=-Wl,-Bsymbolic
124LINKFLAGSSHLCUI+=-Wl,-Bsymbolic
125.ENDIF
126.ENDIF				# "$(NO_BSYMBOLIC)"==""
127
128LINKVERSIONMAPFLAG=-Wl,--version-script
129
130SONAME_SWITCH=-Wl,-h
131
132# Sequence of libs does matter !
133
134STDLIBCPP=-lstdc++
135
136# default objectfilenames to link
137STDOBJGUI=
138STDSLOGUI=
139STDOBJCUI=
140STDSLOCUI=
141
142# libraries for linking applications
143STDLIBGUIMT=-lX11 -lpthread -lm
144STDLIBCUIMT=-lpthread -lm
145# libraries for linking shared libraries
146STDSHLGUIMT=-lX11 -lXext -lpthread -lm
147STDSHLCUIMT=-lpthread -lm
148
149.IF "$(STLPORT_VER)" >= "500"
150LIBSTLPORT=$(DYNAMIC) -lstlport
151LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
152.ELSE
153LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
154LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
155.ENDIF
156
157
158# name of library manager
159LIBMGR=ar
160LIBFLAGS=-r
161
162# tool for generating import libraries
163IMPLIB=
164IMPLIBFLAGS=
165
166MAPSYM=
167MAPSYMFLAGS=
168
169RC=irc
170RCFLAGS=-fo$@ $(RCFILES)
171RCLINK=
172RCLINKFLAGS=
173RCSETVERSION=
174
175# platform specific identifier for shared libs
176DLLPOSTFIX=
177DLLPRE=lib
178DLLPOST=.so
179
180