update dev300-m58
[ooovba.git] / solenv / inc / unxbsdi.mk
blobbf7017042446683ae80d16ab49c9d40b15bd9ce3
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: unxbsdi.mk,v $
11 # $Revision: 1.17 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 # mk file for unxbsdi
33 ASM=
34 AFLAGS=
36 SOLAR_JAVA=TRUE
37 JAVAFLAGSDEBUG=-g
39 # filter for supressing verbose messages from linker
40 #not needed at the moment
41 #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
43 # _PTHREADS is needed for the stl
44 CDEFS+=-DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
46 # this is a platform with JAVA support
47 .IF "$(SOLAR_JAVA)"!=""
48 JAVADEF=-DSOLAR_JAVA
49 .IF "$(debug)"==""
50 JAVA_RUNTIME=-ljava
51 .ELSE
52 JAVA_RUNTIME=-ljava_g
53 .ENDIF
54 .ENDIF
56 # architecture dependent flags for the C and C++ compiler that can be changed by
57 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
58 ARCH_FLAGS*=-mpentiumpro
60 # name of C++ Compiler
61 CXX*=g++
62 # name of C Compiler
63 CC*=gcc
64 # flags for C and C++ Compiler
65 CFLAGS+=-c
66 # flags for the C++ Compiler
67 CFLAGSCC= -pipe $(ARCH_FLAGS)
68 # Flags for enabling exception handling
69 CFLAGSEXCEPTIONS=-fexceptions
70 # Flags for disabling exception handling
71 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
73 CFLAGSCXX= -pipe -frtti $(ARCH_FLAGS)
74 PICSWITCH:=-fpic
76 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
77 CFLAGSOBJGUIMT=
78 # Compiler flags for compiling static object in multi threaded environment with character user interface
79 CFLAGSOBJCUIMT=
80 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
81 CFLAGSSLOGUIMT=$(PICSWITCH)
82 # Compiler flags for compiling shared object in multi threaded environment with character user interface
83 CFLAGSSLOCUIMT=$(PICSWITCH)
84 # Compiler flags for profiling
85 CFLAGSPROF=
86 # Compiler flags for debugging
87 CFLAGSDEBUG=-g
88 CFLAGSDBGUTIL=
89 # Compiler flags for enabling optimizations
90 CFLAGSOPT=-O2
91 # Compiler flags for disabling optimizations
92 CFLAGSNOOPT=-O
93 # Compiler flags for describing the output path
94 CFLAGSOUTOBJ=-o
96 CFLAGSWARNCC=
97 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
98 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
99 CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
100 CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
101 CFLAGSWERRCC=-Werror
103 # switches for dynamic and static linking
104 STATIC = -Wl,-Bstatic
105 DYNAMIC = -Wl,-Bdynamic
107 # name of linker
108 LINK*=gcc
109 # default linker flags
110 LINKFLAGS=
111 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
112 LINKFLAGS += -Wl,--as-needed
113 .ENDIF
115 # linker flags for linking applications
116 LINKFLAGSAPPGUI= -Wl,-export-dynamic
117 LINKFLAGSAPPCUI= -Wl,-export-dynamic
119 # linker flags for linking shared libraries
120 LINKFLAGSSHLGUI= -shared
121 LINKFLAGSSHLCUI= -shared
123 LINKFLAGSTACK=
124 LINKFLAGSPROF=
125 LINKFLAGSDEBUG=-g
126 LINKFLAGSOPT=
128 .IF "$(NO_BSYMBOLIC)"==""
129 .IF "$(PRJNAME)" != "envtest"
130 LINKFLAGSSHLGUI+=-Wl,-Bsymbolic
131 LINKFLAGSSHLCUI+=-Wl,-Bsymbolic
132 .ENDIF
133 .ENDIF # "$(NO_BSYMBOLIC)"==""
135 LINKVERSIONMAPFLAG=-Wl,--version-script
137 SONAME_SWITCH=-Wl,-h
139 # Sequence of libs does matter !
141 STDLIBCPP=-lstdc++
143 # default objectfilenames to link
144 STDOBJGUI=
145 STDSLOGUI=
146 STDOBJCUI=
147 STDSLOCUI=
149 # libraries for linking applications
150 STDLIBGUIMT=-lX11 -lpthread -lm
151 STDLIBCUIMT=-lpthread -lm
152 # libraries for linking shared libraries
153 STDSHLGUIMT=-lX11 -lXext -lpthread -lm
154 STDSHLCUIMT=-lpthread -lm
156 .IF "$(STLPORT_VER)" >= "500"
157 LIBSTLPORT=$(DYNAMIC) -lstlport
158 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
159 .ELSE
160 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
161 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
162 .ENDIF
165 # name of library manager
166 LIBMGR=ar
167 LIBFLAGS=-r
169 # tool for generating import libraries
170 IMPLIB=
171 IMPLIBFLAGS=
173 MAPSYM=
174 MAPSYMFLAGS=
176 RC=irc
177 RCFLAGS=-fo$@ $(RCFILES)
178 RCLINK=
179 RCLINKFLAGS=
180 RCSETVERSION=
182 # platform specific identifier for shared libs
183 DLLPOSTFIX=bi
184 DLLPRE=lib
185 DLLPOST=.so