merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / unxbsds.mk
blob698764f2801e12dedb27c657c7fbeb0e2830525d
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: unxbsds.mk,v $
11 # $Revision: 1.18 $
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 unxbsds
33 ASM=gcc
34 AFLAGS=-Wa,-Av8plusa,-K,PIC -x assembler-with-cpp -c $(CDEFS)
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+=-D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) -DOSL_USE_SYS_V_SEMAPHORE
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*=
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)
69 # Flags for enabling exception handling
70 CFLAGSEXCEPTIONS=-fexceptions
71 # Flags for disabling exception handling
72 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
74 CFLAGSCXX= -pipe $(ARCH_FLAGS)
75 PICSWITCH:=-fPIC
77 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
78 CFLAGSOBJGUIMT=$(PICSWITCH)
79 # Compiler flags for compiling static object in multi threaded environment with character user interface
80 CFLAGSOBJCUIMT=$(PICSWITCH)
81 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
82 CFLAGSSLOGUIMT=$(PICSWITCH)
83 # Compiler flags for compiling shared object in multi threaded environment with character user interface
84 CFLAGSSLOCUIMT=$(PICSWITCH)
85 # Compiler flags for profiling
86 CFLAGSPROF=
87 # Compiler flags for debugging
88 CFLAGSDEBUG=-g
89 CFLAGSDBGUTIL=
90 # Compiler flags for enabling optimizations
91 CFLAGSOPT=-O2
92 # Compiler flags for disabling optimizations
93 CFLAGSNOOPT=-O
94 # Compiler flags for describing the output path
95 CFLAGSOUTOBJ=-o
97 CFLAGSWARNCC=
98 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
99 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
100 CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
101 CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
102 CFLAGSWERRCC=-Werror
104 # switches for dynamic and static linking
105 STATIC = -Wl,-Bstatic
106 DYNAMIC = -Wl,-Bdynamic
108 # name of linker
109 LINK=gcc
110 # default linker flags
111 LINKFLAGS=
113 # linker flags for linking applications
114 LINKFLAGSAPPGUI= -Wl,-export-dynamic
115 LINKFLAGSAPPCUI= -Wl,-export-dynamic
116 # linker flags for linking shared libraries
117 LINKFLAGSSHLGUI= -shared
118 LINKFLAGSSHLCUI= -shared
120 LINKFLAGSTACK=
121 LINKFLAGSPROF=
122 LINKFLAGSDEBUG=-g
123 LINKFLAGSOPT=
125 .IF "$(NO_BSYMBOLIC)"==""
126 .IF "$(PRJNAME)" != "envtest"
127 LINKFLAGSSHLGUI+=-Wl,-Bsymbolic
128 LINKFLAGSSHLCUI+=-Wl,-Bsymbolic
129 .ENDIF
130 .ENDIF # "$(NO_BSYMBOLIC)"==""
132 LINKVERSIONMAPFLAG=-Wl,--version-script
134 # Sequence of libs does matter !
136 STDLIBCPP=-lstdc++
138 # default objectfilenames to link
139 STDOBJGUI=
140 STDSLOGUI=
141 STDOBJCUI=
142 STDSLOCUI=
144 # libraries for linking applications
145 STDLIBGUIMT=-lX11 -lpthread -lm
146 STDLIBCUIMT=-lpthread -lm
147 # libraries for linking shared libraries
148 STDSHLGUIMT=-lX11 -lXext -lpthread -lm
149 STDSHLCUIMT=-lpthread -lm
151 # STLport always needs pthread. This may yield some redundant -lpthread
152 # but that doesn't matter.
153 .IF "$(STLPORT_VER)" >= "500"
154 LIBSTLPORT=$(DYNAMIC) -lstlport -lpthread
155 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -lpthread
156 .ELSE
157 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lpthread
158 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -lpthread
159 .ENDIF
162 # name of library manager
163 LIBMGR=ar
164 LIBFLAGS=-r
166 # tool for generating import libraries
167 IMPLIB=
168 IMPLIBFLAGS=
170 MAPSYM=
171 MAPSYMFLAGS=
173 RC=irc
174 RCFLAGS=-fo$@ $(RCFILES)
175 RCLINK=
176 RCLINKFLAGS=
177 RCSETVERSION=
179 # platform specific identifier for shared libs
180 DLLPOSTFIX=bs
181 DLLPRE=lib
182 DLLPOST=.so