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