Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / moz / makefile.mk
blob13db91fc05173701873644c846549d12695a616b
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
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.
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).
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.
26 #*************************************************************************
28 PRJ=.
30 PRJNAME=ooo_mozab
31 TARGET=ooo_mozab
33 # --- Settings -----------------------------------------------------
35 .INCLUDE : settings.mk
37 # --- Files --------------------------------------------------------
39 # ----- pkg-config start -------
40 .INCLUDE .IGNORE : pkgroot.mk
41 .IF "$(PKGCONFIG_ROOT)"!=""
42 PKG_CONFIG:=$(PKGCONFIG_ROOT)$/bin$/pkg-config
43 PKG_CONFIG_PATH:=$(PKGCONFIG_ROOT)$/lib$/pkgconfig
44 .IF "$(LD_LIBRARY_PATH)"=="" # assume empty implies unset
45 LD_LIBRARY_PATH!:=$(PKGCONFIG_ROOT)$/lib
46 .ELSE
47 LD_LIBRARY_PATH!:=$(LD_LIBRARY_PATH)$(PATH_SEPERATOR)$(PKGCONFIG_ROOT)$/lib
48 .ENDIF
49 .EXPORT : PKG_CONFIG_PATH PKG_CONFIG LD_LIBRARY_PATH
50 .ENDIF # "$(PKGCONFIG_ROOT)"!=""
52 # reduce prerequisites by disabling mozilla binary
53 DISABLE_MOZ_EXECUTABLE=TRUE
54 .EXPORT : DISABLE_MOZ_EXECUTABLE
56 .IF "$(OS)"=="AIX"
57 LDFLAGS+:=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
58 .EXPORT : LDFLAGS
59 .ENDIF
61 .IF "$(SYSBASE)"!="" && "$(OS)" == "LINUX"
62 ## hmm... rather gcc specific switches...
63 CFLAGS:=-isystem $(SYSBASE)/usr/include -B$(SYSBASE)/usr/lib
64 LDFLAGS:= -Wl,--unresolved-symbols=ignore-in-shared-libs -L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -L$(SYSBASE)/usr/X11R6/lib
65 SYSBASE_X11:=--x-includes=$(SYSBASE)/usr/include/X11 --x-libraries=$(SYSBASE)/usr/X11R6/lib
66 MOZ_ENABLE_COREXFONTS=1
67 MOZILLA_CONFIGURE_FLAGS +=--disable-xft
68 .EXPORT : CFLAGS LDFLAGS MOZ_ENABLE_COREXFONTS
69 .ENDIF # "$(SYSBASE)"!="" && "$(OS)" == "LINUX"
71 # ----- pkg-config end -------
73 MOZILLA_VERSION=1.1.14
74 TARFILE_NAME=seamonkey-$(MOZILLA_VERSION).source
75 TARFILE_MD5=a169ab152209200a7bad29a275cb0333
77 TARFILE_ROOTDIR=mozilla
78 PATCH_FILES = \
79 seamonkey-source-$(MOZILLA_VERSION).patch \
80 patches/dtoa.patch \
81 patches/respect_disable_pango.patch \
82 patches/arm_build_fix.patch \
83 patches/link_fontconfig.patch \
84 patches/brokenmakefile.patch \
85 patches/aix_build_fix.patch \
86 patches/libpr0n_build_fix.patch \
87 patches/macosx_build_fix.patch \
88 patches/nss-linux3.patch \
89 patches/clang_add_nsCaseInsensitiveStringComparator_default_constructor.patch \
90 patches/clang_missing_this_pointers.patch \
92 # This file is needed for the W32 build when BUILD_MOZAB is set
93 # (currently only vc8/vs2005 is supported when BUILD_MOZAB is set)
94 .IF "$(COM)"=="GCC"
95 LIBIDL_VC71_ZIPFILE_NAME*=vc71-libIDL-0.6.8-bin.zip
96 LIBGLIB_VC71_ZIPFILE_NAME*=vc71-glib-1.2.10-bin.zip
97 MOZTOOLS_ZIPFILE_NAME*=wintools.zip
98 .ELSE
99 MOZTOOLS_ZIPFILE_NAME*=vc8-moztools.zip
100 .ENDIF
102 ADDITIONAL_FILES=mailnews$/addrbook$/src$/nsAbMD5sum.cpp
104 CONFIGURE_DIR=
105 .IF "$(GUIBASE)"!="aqua"
106 MOZILLA_CONFIGURE_FLAGS += $(SYSBASE_X11)
107 .ENDIF
109 MOZILLA_CONFIGURE_FLAGS += --disable-tests \
110 --enable-application=suite \
111 --enable-ldap \
112 --enable-crypto \
113 --enable-optimize \
114 --enable-strip \
115 --disable-profilelocking \
116 --disable-activex \
117 --disable-activex-scripting \
118 --disable-gnomevfs \
119 --disable-debug \
120 --disable-xprint \
121 --disable-postscript \
122 --without-system-zlib \
123 --with-system-nss \
124 --with-system-nspr \
125 --disable-installer \
126 --disable-accessibility \
127 --disable-xpfe-components \
128 --disable-mathml \
129 --disable-oji \
130 --disable-profilesharing \
131 --disable-boehm \
132 --disable-jsloader \
133 --disable-canvas \
134 --disable-freetype2 \
135 --disable-gnomeui \
136 --disable-image-encoders \
137 --disable-plugins \
138 --disable-printing \
139 --disable-pango \
140 --enable-extensions="pref"
142 .IF "$(SYSTEM_NSS)"=="NO"
144 MOZILLA_CONFIGURE_FLAGS += \
145 --with-nss-prefix=$(OUTDIR) \
146 --with-nspr-prefix=$(OUTDIR)
148 .IF "$(OS)"=="MACOSX"
149 # help the linker to resolve @loader_path to the solver (needed at least for 10.4 / XCode 2.5)
150 LDFLAGS+=$(foreach,name,$(echo nspr4 nss3 nssutil3 plc4 plds4) -Wl,-dylib_file,@loader_path/lib$(name).dylib:$(OUTDIR)/lib/lib$(name).dylib)
151 .ENDIF
152 .ENDIF
154 #disable profilelocking to share profile with mozilla
155 #disable activex and activex-scripting to remove the dependence of Microsoft_SDK\src\mfc\atlbase.h
156 #disable gnomevfs to remove the needed of gnome develop files
157 #disable others to save build times
159 .IF "$(GUI)"=="UNX"
160 .IF "$(GUIBASE)"=="aqua"
161 MOZILLA_CONFIGURE_FLAGS+= \
162 --with-macos-sdk=$(MACOSX_SDK_PATH) \
163 --disable-glibtest \
164 --enable-macos-target=$(MACOSX_DEPLOYMENT_TARGET) \
165 --disable-libxul \
166 --prefix=/@.__________________________________________________$(EXTRPATH)
167 DEFAULT_MOZILLA_TOOLKIT=mac
169 .ELSE
170 #We do not need mozilla ui, but libIDL version are decided by default toolkit.
171 #default-toolkit=xlib need libIDL < 0.68
172 #default-toolkit=gtk2 need libIDL > 0.8 (know as libIDL2)
173 DEFAULT_MOZILLA_TOOLKIT*=gtk2
174 .ENDIF # "$(GUIBASE)"=="aqua"
175 MOZILLA_CONFIGURE_FLAGS+= --enable-default-toolkit=$(DEFAULT_MOZILLA_TOOLKIT)
176 .ENDIF
178 # create a objdir build = build files in a seperate directory, not in the sourcetree directly
179 CONFIGURE_DIR=$(CPU)_objdir
180 BUILD_DIR=$(CONFIGURE_DIR)
181 MOZ_CROSSCOMPILE=CROSS_COMPILE=1 CC="$(CC) -arch $(MOZ_ARCH)" CXX="$(CXX) -arch $(MOZ_ARCH)" AR=ar
183 CONFIGURE_ACTION=$(null,$(MOZ_ARCH) $(NULL) $(MOZ_CROSSCOMPILE)) ../configure $(MOZILLA_CONFIGURE_FLAGS)
185 BUILD_ACTION:=$(GNUMAKE) -j$(EXTMAXPROCESS)
187 .IF "$(GUI)"=="UNX"
188 .IF "$(COMNAME)"=="sunpro5"
189 CXXFLAGS:=-features=tmplife
190 .IF "$(CPU)"=="U"
191 CXXFLAGS+=-m64
192 .ENDIF
193 .EXPORT : CXXFLAGS
194 .ENDIF # "$(COMNAME)"=="sunpro5"
195 .ENDIF
197 .IF "$(COM)" == "GCC"
198 CXXFLAGS+=-fpermissive
199 .IF "$(OS)$(CPUNAME)" == "LINUXPOWERPC64"
200 CXXFLAGS+=-mminimal-toc
201 .ENDIF
202 .EXPORT : CXXFLAGS
203 .ENDIF
205 .IF "$(OS)"=="SOLARIS" && "$(CPUNAME)"=="SPARC" && "$(CPU)"=="U"
206 PKG_CONFIG_PATH=/usr/lib/64/pkgconfig
207 .EXPORT: PKG_CONFIG_PATH
208 MAKE=/usr/sfw/bin/gmake
209 .EXPORT: MAKE
210 CFLAGS=-I/usr/sfw/include
211 .EXPORT: CFLAGS
212 .ENDIF
213 .IF "$(COM)"=="C52" && "$(CPUNAME)"=="SPARC" && "$(CPU)"=="U"
214 CFLAGS=-m64
215 ASFLAGS=-m64
216 .EXPORT: CFLAGS ASFLAGS
217 .ENDIF
219 MOZDIR=$(MISC)$/build$/seamonkey
220 MOZTARGET=$(OS)$(COM)$(CPU)
222 .IF "$(GUI)"=="WNT"
223 # "Our" build environment uses "NO" for the environment variable that
224 # indicate if system libraries should be used, the mozilla build uses
225 # "" in this case. This conflicts (at least for W32) with mozilla (1.7b)
226 # because it disables the library checks for msvc so that
227 # --without-system-* is not evaluated. To build the included libraries
228 # the affected variables have to be empty and not NO.
229 .IF "$(SYSTEM_ZLIB)"=="NO"
230 SYSTEM_ZLIB:=
231 .EXPORT : SYSTEM_ZLIB
232 .ENDIF
233 .IF "$(SYSTEM_JPEG)"=="NO"
234 SYSTEM_JPEG:=
235 .EXPORT : SYSTEM_JPEG
236 .ENDIF
238 # For W32-tcsh CC and CXX must not contain the wrapper, and W32-4nt ( in
239 # some cases ) doesn't work with DOS path notation when building mozilla.
240 .IF "$(COM)"=="GCC"
241 CC:=$(CC:s/guw.exe //:s/ -mno-cygwin//)
242 CXX:=$(CXX:s/guw.exe //:s/ -mno-cygwin//)
243 CPP:=$(CC) -E
244 LD:=ld
245 LIBS:=-lsupc++
246 .EXPORT : CPP LIBS
247 .ELSE
248 CC:=cl.exe
249 CXX:=cl.exe
250 .ENDIF
252 # Variables to install/use our own wintools
253 .IF "$(COM)"=="GCC"
254 MOZTOOLSUNPACK:=$(MISC)$/build$/moztoolsunpack
255 MOZTOOLSINST:=$(MISC)$/build$/moztoolsinst
256 .ELSE
257 MOZTOOLS_EXTRACT:=$(MISC)$/build$/moztools
258 .ENDIF
259 .IF "$(COM)"=="GCC"
260 MOZ_TOOLS_DOS:=$(shell @cygpath -ad "$(MISC)")\build\moztoolsinst
261 PATH!:=$(PATH):$(shell @cygpath $(MOZ_TOOLS_DOS))/bin:$(shell @cygpath $(MOZ_TOOLS_DOS))/vc71/bin
262 SET_MOZ_TOOLS_INSTALL_BAT:=export "MOZ_TOOLS=$(MOZ_TOOLS_DOS)"
263 .ELSE
264 MOZ_TOOLS_DOS:=$(shell @cygpath -ad "$(MISC)")\build\moztools\vc8-moztools
265 PATH!:=$(shell @cygpath $(MOZ_TOOLS_DOS))/bin:$(PATH)
266 .ENDIF
268 MOZ_TOOLS:=$(subst,\,/ $(MOZ_TOOLS_DOS))
269 .IF "$(COM)"=="GCC"
270 GLIB_PREFIX:=$(MOZ_TOOLS)/vc71
271 LIBIDL_PREFIX:=$(MOZ_TOOLS)/vc71
272 .EXPORT : GLIB_PREFIX LIBIDL_PREFIX
273 .ENDIF
275 .EXPORT : PATH MOZ_TOOLS
276 .ENDIF # "$(GUI)"=="WNT"
278 # --- Targets ------------------------------------------------------
280 .IF "$(BUILD_MOZAB)"==""
281 all:
282 @echo "Never Build Mozilla."
283 .ENDIF
285 .INCLUDE : set_ext.mk
286 .INCLUDE : target.mk
287 .INCLUDE : tg_ext.mk
289 .IF "$(GUI)"=="WNT"
290 NEEDWINTOOLSFLAGFILE:=$(MISC)$/build$/moztools.complete
291 .ENDIF # "$(GUI)"=="WNT"
293 ALLTAR: $(NEEDWINTOOLSFLAGFILE) \
294 $(MISC)$/remove_build.flag \
295 extract_mozab_files
297 $(PACKAGE_DIR)$/$(UNTAR_FLAG_FILE) : $(MISC)$/remove_build.flag
299 # Since you never know what will be in a patch (for example, it may already
300 # patch at configure level), we remove the entire package directory if a patch
301 # is newer.
302 $(MISC)$/remove_build.flag : $(PATCH_FILES)
303 $(REMOVE_PACKAGE_COMMAND)
304 $(TOUCH) $(MISC)$/remove_build.flag
306 # Unpack/setup Windows build tools
307 .IF "$(GUI)"=="WNT"
308 $(PACKAGE_DIR)$/$(UNTAR_FLAG_FILE) : $(MISC)$/build$/moztools.complete
310 .IF "$(COM)"=="GCC"
311 $(MISC)$/build$/moztools.unpack : $(PRJ)$/download$/$(MOZTOOLS_ZIPFILE_NAME)
312 -$(RENAME) $(MOZTOOLSUNPACK) $(MOZTOOLSUNPACK)_removeme
313 -$(RENAME) $(MOZTOOLSINST) $(MOZTOOLSINST)_removeme
314 -rm -rf $(MOZTOOLSUNPACK)_removeme $(MOZTOOLSINST)_removeme
315 @-$(MKDIRHIER) $(MOZTOOLSUNPACK)
316 unzip $(PRJ)$/download$/$(MOZTOOLS_ZIPFILE_NAME) -d $(MOZTOOLSUNPACK)
317 $(TOUCH) $(MISC)$/build$/moztools.unpack
319 $(MISC)$/build$/moztools.install : $(MISC)$/build$/moztools.unpack
320 cd $(MOZTOOLSUNPACK)$/buildtools$/windows && $(SET_MOZ_TOOLS_INSTALL_BAT) && cmd /c install.bat
321 $(TOUCH) $(MISC)$/build$/moztools.install
323 $(MISC)$/build$/moztools.complete : \
324 $(MISC)$/build$/moztools.install \
325 $(PRJ)$/download$/$(LIBIDL_VC71_ZIPFILE_NAME) \
326 $(PRJ)$/download$/$(LIBGLIB_VC71_ZIPFILE_NAME)
327 unzip $(PRJ)$/download$/$(LIBIDL_VC71_ZIPFILE_NAME) -d $(MOZTOOLSINST)
328 unzip $(PRJ)$/download$/$(LIBGLIB_VC71_ZIPFILE_NAME) -d $(MOZTOOLSINST)
329 # chmod is also needed for W32-4nt build (when cygwin unzip is used)
330 -chmod -R +x $(MOZTOOLSINST)$/vc71$/bin
331 $(TOUCH) $(MISC)$/build$/moztools.complete
332 .ELSE
333 $(MISC)$/build$/moztools.unpack : $(PRJ)$/download$/$(MOZTOOLS_ZIPFILE_NAME)
334 -$(RENAME) $(MOZTOOLS_EXTRACT) $(MOZTOOLS_EXTRACT)_removeme
335 -rm -rf $(MOZTOOLS_EXTRACT)_removeme
336 @-$(MKDIRHIER) $(MOZTOOLS_EXTRACT)
337 unzip $(PRJ)$/download$/$(MOZTOOLS_ZIPFILE_NAME) -d $(MOZTOOLS_EXTRACT)
338 # chmod is also needed for W32-4nt build (when cygwin unzip is used)
339 -chmod -R +x $(MOZTOOLS_EXTRACT)$/vc8-moztools$/bin
340 $(TOUCH) $(MISC)$/build$/moztools.unpack
342 $(MISC)$/build$/moztools.complete : $(MISC)$/build$/moztools.unpack
343 $(TOUCH) $(MISC)$/build$/moztools.complete
344 .ENDIF
345 .ENDIF # "$(GUI)"=="WNT"
347 zip: \
348 $(MISC)$/CREATETARBALL
350 .IF "$(GUIBASE)"=="aqua" && "$(CREATE_UNIVERSAL_MAC_MOZ_ZIP)"!=""
351 MOZ_ARCH=$(eq,$(CPU),I i386 ppc)
352 MOZILLA_CONFIGURE_FLAGS+=$(eq,$(CPU),I --target=i386-apple-darwin8 --target=powerpc-apple-darwin8)
354 force_clean :
355 @$(IFEXIST) $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE) $(THEN) echo 'ERROR: get rid of your outputdir first (or refactor the makefiles to allow incremental creation of prebuilt zips). Remember to copy already created zips to a safe place '; exit 1 $(FI)
357 zip_intel .SEQUENTIAL: force_clean $(MISC)$/CREATETARBALL
359 zip_ppc .SEQUENTIAL: force_clean $(MISC)$/CREATETARBALL
361 # target-conditionals, when building target -> Macro is set
362 zip_intel ?= MOZ_ARCH=i386
363 zip_intel ?= MOZILLA_CONFIGURE_FLAGS+=--target=i386-apple-darwin8
364 zip_intel ?= CPU=I
366 zip_ppc ?= MOZ_ARCH=ppc
367 zip_ppc ?= MOZILLA_CONFIGURE_FLAGS+=--target=powerpc-apple-darwin8
368 zip_ppc ?= CPU=P
370 zip_universal: $(OUT)$/zipped$/$(OS)$(COM)UBinc.zip $(OUT)$/zipped$/$(OS)$(COM)UBlib.zip $(OUT)$/zipped$/$(OS)$(COM)UBruntime.zip
371 @echo "All zips created successfully - copy from $(OUT)$/zipped to \$$SRC_ROOT/moz/zipped and use --disable-build-mozilla to use them"
373 $(OUT)$/zipped$/$(OS)$(COM)UBinc.zip : zipped$/$(OS)$(COM)Pinc.zip zipped$/$(OS)$(COM)Iinc.zip
374 @echo "setting up for $@"
375 @rm -rf $(MISC)$/UB_inc
376 @$(MKDIRHIER) $(MISC)$/UB_inc$/intel
377 @$(MKDIR) $(MISC)$/UB_inc$/ppc
378 @$(MKDIR) $(MISC)$/UB_inc$/uni
379 @unzip -q zipped$/$(OS)$(COM)Pinc.zip -d $(MISC)$/UB_inc$/ppc
380 @unzip -q zipped$/$(OS)$(COM)Iinc.zip -d $(MISC)$/UB_inc$/intel
381 # use one of the two as basis for the universal one - (saves manually creating directories/copying identical files)
382 @unzip -q zipped$/$(OS)$(COM)Pinc.zip -d $(MISC)$/UB_inc$/uni
383 # add safety-warning to host-autogenerated headers (aren't used anywhere in OOo currently, but doesn't hurt to be safe
384 # bail out on everything that differs and is not a *.h file
385 @echo "flagging endian-specific headers with #error.."
386 @diff --brief -r $(MISC)$/UB_inc$/ppc $(MISC)$/UB_inc$/intel | awk \
387 '/^Only in/ {{print; print "ERROR - file sets differ!"; exit 1}} \
388 /^Files .*\.h differ$$/ {{target="$(MISC)$/UB_inc$/uni$/" substr($$2,length("$(MISC)$/UB_inc$/ppc")+2); \
389 system("echo \"#error use native moz-zips, this header is endian-specific!\" | cat - " $$2 " > " target); next}} \
390 {{print; print "ERROR - unexpected files encountered!"; exit 2}}'
391 @cd $(MISC)$/UB_inc$/uni ; zip -q -r ..$/$(@:f) *
392 @$(MKDIRHIER) $(@:d)
393 @$(MV) $(MISC)$/UB_inc$/$(@:f) $@
394 @echo "successfully created $@"
396 $(OUT)$/zipped$/$(OS)$(COM)UBlib.zip : zipped$/$(OS)$(COM)Plib.zip zipped$/$(OS)$(COM)Ilib.zip
397 @echo "setting up for $@"
398 @rm -rf $(MISC)$/UB_lib
399 @$(MKDIRHIER) $(MISC)$/UB_lib$/intel
400 @$(MKDIR) $(MISC)$/UB_lib$/ppc
401 @$(MKDIR) $(MISC)$/UB_lib$/uni
402 @unzip -q zipped$/$(OS)$(COM)Plib.zip -d $(MISC)$/UB_lib$/ppc
403 @unzip -q zipped$/$(OS)$(COM)Ilib.zip -d $(MISC)$/UB_lib$/intel
404 # use lipo on .a and .dylib files - bail out on anything else
405 @echo "creating universal binaries from libs..."
406 @diff --brief -s -r $(MISC)$/UB_lib$/ppc $(MISC)$/UB_lib$/intel | awk \
407 '/^Only in/ {{print "ERROR - file sets differ!"; print; exit 1}} \
408 /^Files .*\.(a|dylib) differ$$/ {{target="$(MISC)$/UB_lib$/uni$/" substr($$2,length("$(MISC)$/UB_lib$/ppc")+2); \
409 if(0!=system("lipo -create -arch ppc "$$2" -arch i386 "$$4" -output " target)) exit 11; next}} \
410 {{print; print "ERROR - unexpected files encountered!"; exit 2}}'
411 @cd $(MISC)$/UB_lib$/uni ; zip -q -r ..$/$(@:f) *
412 @$(MKDIRHIER) $(@:d)
413 @$(MV) $(MISC)$/UB_lib$/$(@:f) $@
414 @echo "successfully created $@"
416 $(OUT)$/zipped$/$(OS)$(COM)UBruntime.zip : zipped$/$(OS)$(COM)Pruntime.zip zipped$/$(OS)$(COM)Iruntime.zip
417 @echo "setting up for $@"
418 @rm -rf $(MISC)$/UB_runtime
419 @$(MKDIRHIER) $(MISC)$/UB_runtime$/intel
420 @$(MKDIR) $(MISC)$/UB_runtime$/ppc
421 @$(MKDIR) $(MISC)$/UB_runtime$/uni
422 @unzip -q zipped$/$(OS)$(COM)Pruntime.zip -d $(MISC)$/UB_runtime$/ppc
423 @unzip -q zipped$/$(OS)$(COM)Iruntime.zip -d $(MISC)$/UB_runtime$/intel
424 # use one of the two as basis for the universal one - (saves manually creating directories/copying identical files)
425 @unzip -q zipped$/$(OS)$(COM)Pruntime.zip -d $(MISC)$/UB_runtime$/uni
426 # @line -comments in autogenerated files: contains path of source-file, ignore different objdirs
427 @echo "creating universal binaries from libs..."
428 @diff --brief -I "^//@line [0-9][0-9]*" -r $(MISC)$/UB_runtime$/ppc $(MISC)$/UB_runtime$/intel | awk \
429 '/^Only in/ {{print; print "ERROR - file sets differ!"; exit 1}} \
430 /^Files .*\.dylib differ$$/ {{target="$(MISC)$/UB_runtime$/uni$/" substr($$2,length("$(MISC)$/UB_runtime$/ppc")+2); \
431 if(0!=system("lipo -create -arch ppc "$$2" -arch i386 "$$4" -output " target)) exit 11; next}} \
432 {{print; print "ERROR - unexpected files encountered!"; exit 2}}'
433 @cd $(MISC)$/UB_lib$/uni ; zip -q -r ..$/$(@:f) *
434 @$(MKDIRHIER) $(@:d)
435 @$(MV) $(MISC)$/UB_lib$/$(@:f) $@
436 @echo "successfully created $@"
438 .ENDIF # $(GUIBASE)=="aqua"
440 .INCLUDE : extractfiles.mk