Lines 2-10
Link Here
|
2 |
# |
2 |
# |
3 |
# $RCSfile: unxmacxp.mk,v $ |
3 |
# $RCSfile: unxmacxp.mk,v $ |
4 |
# |
4 |
# |
5 |
# $Revision: 1.43 $ |
5 |
# $Revision: 1.42.48.1 $ |
6 |
# |
6 |
# |
7 |
# last change: $Author: hr $ $Date: 2003/07/16 18:21:12 $ |
7 |
# last change: $Author: fa $ $Date: 2003/07/15 02:07:30 $ |
8 |
# |
8 |
# |
9 |
# The Contents of this file are made available subject to the terms of |
9 |
# The Contents of this file are made available subject to the terms of |
10 |
# either of the following licenses |
10 |
# either of the following licenses |
Lines 75-85
Link Here
|
75 |
# Definitions that we may need on the compile line. |
75 |
# Definitions that we may need on the compile line. |
76 |
# -D_PTHREADS and -D_REENTRANT are needed for STLport, and must be specified when |
76 |
# -D_PTHREADS and -D_REENTRANT are needed for STLport, and must be specified when |
77 |
# compiling STLport sources too, either internally or externally. |
77 |
# compiling STLport sources too, either internally or externally. |
78 |
CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY -DSTLPORT_VERSION=400 -D_USE_NAMESPACE=1 |
78 |
CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY -DPOWERPC -DPPC -DSTLPORT_VERSION=400 -D_USE_NAMESPACE=1 |
79 |
|
79 |
|
80 |
# Name of library where static data members are initialized |
80 |
# Name of library where static data members are initialized |
81 |
STATICLIBNAME=static$(DLLPOSTFIX) |
81 |
# STATICLIBNAME=static$(DLLPOSTFIX) |
82 |
STATICLIB=-l$(STATICLIBNAME) |
82 |
# STATICLIB=-l$(STATICLIBNAME) |
83 |
|
83 |
|
84 |
# MacOS X specific Java compilation/link flags |
84 |
# MacOS X specific Java compilation/link flags |
85 |
.IF "$(SOLAR_JAVA)"!="" |
85 |
.IF "$(SOLAR_JAVA)"!="" |
Lines 94-227
Link Here
|
94 |
# CC = C++ compiler to use |
94 |
# CC = C++ compiler to use |
95 |
# cc = C compiler to use |
95 |
# cc = C compiler to use |
96 |
# objc = Objective C compiler to use |
96 |
# objc = Objective C compiler to use |
97 |
#CC=c++ |
97 |
CXX*=g++ |
98 |
#cc=cc |
98 |
CC*=gcc |
99 |
objc=cc |
99 |
objc=cc |
100 |
|
100 |
|
101 |
# [ed] 6/15/02 Some .. bleep .. decided to make a directory within a module that has the same |
101 |
CFLAGS=-fsigned-char -fmessage-length=0 -malign-natural -c $(INCLUDE) |
102 |
# name as one of the STL headers. This sucks since, with Apple's compilers, if a directory |
|
|
103 |
# with a name appears in a directory specified with a -I directive, the compiler will flag |
104 |
# an error and not search for a file with that name in a following -I directive on the |
105 |
# command line. Therefore...this ugly hack...put STL as the first include on the linkline. |
106 |
|
107 |
# Remeber: STLPORT4=="NO_STLPORT4" generally indicates that we are using the _INTERNAL_ stlport |
108 |
# in OOo and not an external one. |
109 |
|
110 |
.IF "$(STLPORT4)"!="" |
111 |
.IF "$(STLPORT4)"=="NO_STLPORT4" |
112 |
# [ed] We need to add in the STLport include directory included with the standard OOo sources, |
113 |
# currently STLPORT 4.5. |
114 |
CFLAGS=-c -I$(SOLARVERSION)$/$(GVERDIR)$/inc/stl $(INCLUDE) |
115 |
.ELSE |
116 |
# [ed] Add in external STLport includes directory if not using internal stlport |
117 |
CFLAGS=-c -I$(STLPORT4)$/stlport $(INCLUDE) |
118 |
.ENDIF |
119 |
.ELSE |
120 |
# Otherwise, some indeterminiate STLport... |
121 |
CFLAGS=-c -I$(SOLARVERSION)$/$(GVERDIR)$/inc/stl $(INCLUDE) |
122 |
.ENDIF |
123 |
|
102 |
|
124 |
# --------------------------------- |
103 |
# --------------------------------- |
125 |
# Compilation flags |
104 |
# Compilation flags |
126 |
# --------------------------------- |
105 |
# --------------------------------- |
127 |
# Normal C compilation flags |
106 |
# Normal C compilation flags |
128 |
CFLAGSCC=-pipe -fno-common -malign-natural |
107 |
CFLAGSCC=-pipe -fsigned-char -malign-natural |
129 |
|
108 |
|
130 |
# Normal Objective C compilation flags |
109 |
# Normal Objective C compilation flags |
131 |
OBJCFLAGS=-no-precomp |
110 |
OBJCFLAGS=-no-precomp |
132 |
|
111 |
|
133 |
# Comp Flags for files that need exceptions enabled (C and C++) |
112 |
# Comp Flags for files that need exceptions enabled (C and C++) |
134 |
CFLAGSEXCEPTIONS=-fexceptions |
113 |
CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs |
|
|
114 |
|
135 |
# Comp Flags for files that do not need exceptions enabled (C and C++) |
115 |
# Comp Flags for files that do not need exceptions enabled (C and C++) |
136 |
CFLAGS_NO_EXCEPTIONS=-fno-exceptions |
116 |
CFLAGS_NO_EXCEPTIONS=-fno-exceptions |
137 |
|
117 |
|
138 |
# Normal C++ compilation flags |
118 |
# Normal C++ compilation flags |
139 |
CFLAGSCXX=-pipe -malign-natural -fno-for-scope -fpermissive -fno-operator-names -fno-common -Wno-long-double -fno-strict-aliasing |
119 |
CFLAGSCXX=-pipe -malign-natural -fsigned-char -fno-for-scope -fpermissive -Wno-long-double |
140 |
|
120 |
|
141 |
# Other flags |
121 |
# Other flags |
142 |
CFLAGSOBJGUIST=-fPIC |
122 |
CFLAGSOBJGUIST=-fPIC -fno-common |
143 |
CFLAGSOBJCUIST=-fPIC |
123 |
CFLAGSOBJCUIST=-fPIC -fno-common |
144 |
CFLAGSOBJGUIMT=-fPIC |
124 |
CFLAGSOBJGUIMT=-fPIC -fno-common |
145 |
CFLAGSOBJCUIMT=-fPIC |
125 |
CFLAGSOBJCUIMT=-fPIC -fno-common |
146 |
CFLAGSSLOGUIMT=-fPIC |
126 |
CFLAGSSLOGUIMT=-fPIC -fno-common |
147 |
CFLAGSSLOCUIMT=-fPIC |
127 |
CFLAGSSLOCUIMT=-fPIC -fno-common |
148 |
CFLAGSPROF= |
128 |
CFLAGSPROF= |
|
|
129 |
|
149 |
# Flag for including debugging information in object files |
130 |
# Flag for including debugging information in object files |
150 |
CFLAGSDEBUG=-g |
131 |
CFLAGSDEBUG=-g |
151 |
CFLAGSDBGUTIL= |
132 |
CFLAGSDBGUTIL= |
|
|
133 |
|
152 |
# Flag to specify output file to compiler/linker |
134 |
# Flag to specify output file to compiler/linker |
153 |
CFLAGSOUTOBJ=-o |
135 |
CFLAGSOUTOBJ=-o |
154 |
|
136 |
|
155 |
# --------------------------------- |
137 |
# --------------------------------- |
156 |
# Optimization flags |
138 |
# Optimization flags |
157 |
# --------------------------------- |
139 |
# --------------------------------- |
158 |
# Workaround for the compiler's buggy opitmizer when exceptions are turned on. |
140 |
CFLAGSOPT=-O2 -fno-strict-aliasing |
159 |
# Note that we have to define NO_OPTIMIZE for all files as once you turn off |
141 |
CFLAGSNOOPT=-O0 |
160 |
# optimizing for one file, we need to adjust our compiling of the remaining |
|
|
161 |
# optimized files. |
162 |
CDEFS+=-DNO_OPTIMIZE |
163 |
.IF "$(ENABLE_EXCEPTIONS)"=="" |
164 |
# Opt flags when exceptions are _dis_abled |
165 |
CFLAGSOPT=-O2 |
166 |
CFLAGSNOOPT=-O |
167 |
.ELSE |
168 |
# Opt flags when exceptions are enabled |
169 |
CFLAGSOPT= |
170 |
CFLAGSNOOPT= |
171 |
.ENDIF |
172 |
|
142 |
|
173 |
# Currently, there is no nas support for OS X... |
143 |
# Currently, there is no nas support for OS X... |
174 |
CDEFS+= -DNO_AUDIO |
144 |
CDEFS+= -DNO_AUDIO |
175 |
|
145 |
|
176 |
# --------------------------------- |
146 |
# --------------------------------- |
177 |
# Shared Library names |
|
|
178 |
# --------------------------------- |
179 |
# Add all libraries to the shared lib list that ARE NOT lib*static or cppuhelper (to prevent multiply defined errors) |
180 |
SOLARVERSHLLIBS=$(shell -/bin/sh -c "ls $(SOLARLIBDIR)$/*$(DLLPOST) $(SOLARLIBDIR)$/*$(DLLPOST).*[0-9] $(LB)$/*$(DLLPOST) $(LB)$/*$(DLLPOST).*[0-9] $(MISC)$/*$(DLLPOST) $(MISC)$/*$(DLLPOST).*[0-9] 2>/dev/null | grep -E -v 'lib\w+static' | grep -v cppuhelper") |
181 |
|
182 |
# --------------------------------- |
183 |
# STLport library names |
147 |
# STLport library names |
184 |
# --------------------------------- |
148 |
# --------------------------------- |
185 |
# Option for adding STLport _dynamic_ library to the link line |
149 |
LIBSTLPORT=-lstlport_gcc -lstdc++ |
186 |
LIBSTLPORT=-lstlport_gcc |
150 |
LIBSTLPORTST=$(SOLARVERSION)$/$(INPATH)$/lib/libstlport_gcc.a -lstdc++ |
187 |
|
|
|
188 |
# Get the name of the static STLport library |
189 |
.IF "$(STLPORT4)"=="" || "$(STLPORT4)"=="NO_STLPORT4" |
190 |
LIBSTLPORTST=$(SOLARVERSION)$/$(INPATH)$/lib/libstlport_gcc.a |
191 |
.ELSE |
192 |
LIBSTLPORTST=$(STLPORT4)$/lib/libstlport_gcc.a |
193 |
.ENDIF |
194 |
|
195 |
# Get the name of the dynamic STLport library and add it to the shared lib list |
196 |
.IF "$(STLPORT4)"!="" |
197 |
.IF "$(STLPORT4)"=="NO_STLPORT4" |
198 |
# Look for STLport 4.5 libraries in SOLARLIBDIR |
199 |
SOLARVERSHLLIBS+=$(shell -/bin/sh -c "ls $(SOLARLIBDIR)$/$(DLLPRE)$(LIBSTLPORT:s/-l//)$(DLLPOST) 2>/dev/null") |
200 |
.ELSE |
201 |
# Look for STLport 4.0 libraries in the STLport4 home directory |
202 |
SOLARVERSHLLIBS+=$(shell -/bin/sh -c "ls $(STLPORT4)$/lib$/*$(DLLPOST) $(STLPORT4)$/lib$/*$(DLLPOST).*[0-9] 2>/dev/null") |
203 |
.ENDIF |
204 |
.ENDIF |
205 |
|
206 |
# --------------------------------- |
207 |
# Module specific shared lib requirements |
208 |
# --------------------------------- |
209 |
.IF "$(PRJNAME)"!="cppuhelper" |
210 |
# For all projects _except_ cppuhelper, add cppuhelper's library to the shared lib list. |
211 |
# Note this only adds cppuhelper and no other libraries. |
212 |
# Attempting to link cppuhelper to itself results in multiple defines errors |
213 |
SOLARVERSHLLIBS+=$(shell -/bin/sh -c "ls $(SOLARLIBDIR)$/*$(DLLPOST) $(SOLARLIBDIR)$/*$(DLLPOST).*[0-9] $(LB)$/*$(DLLPOST) $(LB)$/*$(DLLPOST).*[0-9] $(MISC)$/*$(DLLPOST) $(MISC)$/*$(DLLPOST).*[0-9] 2>/dev/null | grep -E -v 'lib\w+static' | grep cppuhelper") |
214 |
.ENDIF |
215 |
|
151 |
|
216 |
# --------------------------------- |
152 |
# --------------------------------- |
217 |
# Link stage flags |
153 |
# Link stage flags |
218 |
# --------------------------------- |
154 |
# --------------------------------- |
219 |
# For MacOS X, always use C++ compiler for linking because it does some library |
155 |
# always link with gcc since you may be linking c code and don't want -lstdc++ linked in! |
220 |
# order magic behind the scenes |
156 |
LINK=gcc |
221 |
LINK=c++ |
157 |
LINKFLAGS=-Wl,-multiply_defined,suppress |
222 |
LINKFLAGS=-dynamic -framework System -Wl,-multiply_defined,suppress -lcc_dynamic -lstdc++ -L$(MISC) |
158 |
|
223 |
#LINKFLAGS=-dynamic -framework System -framework CoreFoundation -lcc_dynamic -lstdc++ \ |
159 |
# LINKFLAGS=-dynamic -framework System -Wl,-multiply_defined,suppress -lcc_dynamic -lstdc++ -L$(MISC) |
224 |
# $(foreach,i,$(SOLARVERSHLLIBS) -dylib_file @executable_path$/$(i:f):$i) -L$(MISC) |
|
|
225 |
|
160 |
|
226 |
# [ed] 5/14/02 If we're building for aqua, add in the objc runtime library into our link line |
161 |
# [ed] 5/14/02 If we're building for aqua, add in the objc runtime library into our link line |
227 |
.IF "$(GUIBASE)" == "aqua" |
162 |
.IF "$(GUIBASE)" == "aqua" |
Lines 232-254
Link Here
|
232 |
.ENDIF |
167 |
.ENDIF |
233 |
|
168 |
|
234 |
# Random link flags dealing with different cases of linking |
169 |
# Random link flags dealing with different cases of linking |
235 |
# UNIXVERSIONNAMES specifies whether or not to use library versioning |
170 |
|
236 |
# (ie libstlport.dylib.4.5) rather than no versioning. We currently |
171 |
LINKFLAGSAPPGUI=-bind_at_load |
237 |
# use this on MacOS X. |
|
|
238 |
LINKFLAGSAPPGUI= |
239 |
.IF "$(UNIXVERSIONNAMES)"!="" |
172 |
.IF "$(UNIXVERSIONNAMES)"!="" |
240 |
LINKFLAGSSHLGUI=-dynamiclib -install_name '@executable_path$/$(@:f:b:b)' |
173 |
LINKFLAGSSHLGUI=-dynamiclib -single_module -install_name '@executable_path$/$(@:f:b:b)' |
241 |
.ELSE |
174 |
.ELSE |
242 |
LINKFLAGSSHLGUI=-dynamiclib -install_name '@executable_path$/$(@:f)' |
175 |
LINKFLAGSSHLGUI=-dynamiclib -single_module -install_name '@executable_path$/$(@:f)' |
243 |
.ENDIF |
176 |
.ENDIF |
244 |
LINKFLAGSAPPCUI=-Wl,-u,__objcInit |
177 |
LINKFLAGSAPPCUI=-bind_at_load -Wl,-u,__objcInit |
245 |
.IF "$(UNIXVERSIONNAMES)"!="" |
178 |
.IF "$(UNIXVERSIONNAMES)"!="" |
246 |
LINKFLAGSSHLCUI=-dynamiclib -install_name '@executable_path$/$(@:f:b:b)' |
179 |
LINKFLAGSSHLCUI=-dynamiclib -single_module -install_name '@executable_path$/$(@:f:b:b)' |
247 |
.ELSE |
180 |
.ELSE |
248 |
LINKFLAGSSHLCUI=-dynamiclib -install_name '@executable_path$/$(@:f)' |
181 |
LINKFLAGSSHLCUI=-dynamiclib -single_module -install_name '@executable_path$/$(@:f)' |
249 |
.ENDIF |
182 |
.ENDIF |
250 |
LINKFLAGSTACK= |
183 |
LINKFLAGSTACK= |
251 |
LINKFLAGSPROF= |
184 |
LINKFLAGSPROF= |
|
|
185 |
|
252 |
# Flag to add debugging information to final products |
186 |
# Flag to add debugging information to final products |
253 |
LINKFLAGSDEBUG=-g |
187 |
LINKFLAGSDEBUG=-g |
254 |
LINKFLAGSOPT= |
188 |
LINKFLAGSOPT= |
Lines 264-287
Link Here
|
264 |
DLLPOST=.dylib |
198 |
DLLPOST=.dylib |
265 |
|
199 |
|
266 |
# We don't use mapping on MacOS X |
200 |
# We don't use mapping on MacOS X |
267 |
LINKVERSIONMAPFLAG= |
201 |
LINKVERSIONMAPFLAG=-Wl,--version-script |
|
|
202 |
|
203 |
SONAME_SWITCH=-Wl,-h |
268 |
|
204 |
|
269 |
# Reihenfolge der libs NICHT egal! |
205 |
STDLIBCPP=-lstdc++ |
270 |
|
206 |
|
271 |
STDOBJGUI= |
207 |
STDOBJGUI= |
272 |
STDSLOGUI= |
208 |
STDSLOGUI= |
273 |
STDOBJCUI= |
209 |
STDOBJCUI= |
274 |
STDSLOCUI= |
210 |
STDSLOCUI= |
275 |
|
211 |
|
276 |
STDLIBGUIST= |
212 |
STDLIBGUIST=-lm |
277 |
STDLIBCUIST= |
213 |
STDLIBCUIST=-lX11 -lpthread -lm |
278 |
STDLIBGUIMT= |
214 |
STDLIBGUIMT=-lpthread -lm |
279 |
STDLIBCUIMT= |
215 |
STDLIBCUIMT=-lX11 -lm |
280 |
STDSHLGUIMT= |
216 |
STDSHLGUIMT=-lX11 -lXext -lpthread -m |
281 |
STDSHLCUIMT= |
217 |
STDSHLCUIMT=-lpthread -lm |
282 |
|
218 |
|
283 |
LIBMGR=libtool |
219 |
LIBMGR=ar |
284 |
LIBFLAGS=-o |
220 |
LIBFLAGS=-r |
285 |
|
221 |
|
286 |
IMPLIB= |
222 |
IMPLIB= |
287 |
IMPLIBFLAGS= |
223 |
IMPLIBFLAGS= |