fix toolbar import
[ooovba.git] / moz / makefile.mk
blobf96a46d41b95ea6ddd0acca24449c46570e874a7
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: makefile.mk,v $
11 # $Revision: 1.15 $
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 PRJ=.
34 PRJNAME=ooo_mozab
35 TARGET=ooo_mozab
37 # --- Settings -----------------------------------------------------
39 .INCLUDE : settings.mk
41 # --- Files --------------------------------------------------------
42 # ----- pkg-config start -------
43 .INCLUDE .IGNORE : pkgroot.mk
44 .IF "$(PKGCONFIG_ROOT)"!=""
45 PKG_CONFIG:=$(PKGCONFIG_ROOT)$/bin$/pkg-config
46 PKG_CONFIG_PATH:=$(PKGCONFIG_ROOT)$/lib$/pkgconfig
47 LD_LIBRARY_PATH!:=$(subst,$(SOLARLIBDIR),$(SOLARLIBDIR)$(PATH_SEPERATOR)$(PKGCONFIG_ROOT)$/lib $(LD_LIBRARY_PATH))
48 .EXPORT : PKG_CONFIG_PATH PKG_CONFIG LD_LIBRARY_PATH
49 .ENDIF # "$(PKGCONFIG_ROOT)"!=""
51 .IF "$(BUILD_SPECIAL)"!=""
52 # reduce prerequisites by disabling mozilla binary
53 DISABLE_MOZ_EXECUTABLE=TRUE
54 .EXPORT : DISABLE_MOZ_EXECUTABLE
55 .ENDIF # "$(BUILD_SPECIAL)"!=""
57 .IF "$(SYSBASE)"!="" && "$(OS)" == "LINUX"
58 # hmm... rather gcc specific switches...
59 CFLAGS:=-isystem $(SYSBASE)/usr/include -B$(SYSBASE)/usr/lib
60 LDFLAGS:=-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -L$(SYSBASE)/usr/X11R6/lib
61 SYSBASE_X11:=--x-includes=$(SYSBASE)/usr/include/X11 --x-libraries=$(SYSBASE)/usr/X11R6/lib
62 .EXPORT : CFLAGS LDFLAGS
63 .ENDIF # "$(SYSBASE)"!="" && "$(OS)" == "LINUX"
65 # ----- pkg-config end -------
67 MOZILLA_VERSION*=1.1.13
68 TARFILE_NAME=seamonkey-$(MOZILLA_VERSION).source
70 TARFILE_ROOTDIR=mozilla
71 PATCH_FILE_NAME=seamonkey-source-$(MOZILLA_VERSION).patch
73 # This file is needed for the W32 build when BUILD_MOZAB is set
74 # (currently only vc8/vs2005 is supported when BUILD_MOZAB is set)
75 MOZTOOLS_ZIPFILE_NAME*=vc8-moztools.zip
77 ADDITIONAL_FILES=mailnews$/addrbook$/src$/nsAbMD5sum.cpp
79 CONFIGURE_DIR=
80 .IF "$(GUIBASE)"!="aqua"
81 MOZILLA_CONFIGURE_FLAGS += $(SYSBASE_X11)
82 .ENDIF
84 MOZILLA_CONFIGURE_FLAGS += --disable-tests \
85 --enable-application=suite \
86 --enable-ldap \
87 --enable-crypto \
88 --enable-optimize \
89 --enable-strip \
90 --disable-profilelocking \
91 --disable-activex \
92 --disable-activex-scripting \
93 --disable-gnomevfs \
94 --disable-debug \
95 --disable-xprint \
96 --disable-postscript \
97 --without-system-zlib \
98 --disable-installer \
99 --disable-accessibility \
100 --disable-xpfe-components \
101 --disable-mathml \
102 --disable-oji \
103 --disable-profilesharing \
104 --disable-boehm \
105 --disable-jsloader \
106 --disable-canvas \
107 --disable-xft \
108 --disable-freetype2 \
109 --disable-gnomeui \
110 --disable-image-encoders \
111 --disable-plugins \
112 --disable-printing \
113 --enable-extensions="pref"
115 #.IF "$(GUI)"!="WNT"
116 #MOZILLA_CONFIGURE_FLAGS += --enable-system-cairo
117 #.ENDIF
119 #disable profilelocking to share profile with mozilla
120 #disable activex and activex-scripting to remove the dependence of Microsoft_SDK\src\mfc\atlbase.h
121 #disable gnomevfs to remove the needed of gnome develop files
122 #disable others to save build times
124 .IF "$(GUI)"=="UNX"
125 .IF "$(GUIBASE)"=="aqua"
126 MACDEVSDK*=/Developer/SDKs/MacOSX10.4u.sdk
127 MOZILLA_CONFIGURE_FLAGS+= \
128 --with-macos-sdk=$(MACDEVSDK) \
129 --disable-glibtest \
130 --enable-macos-target=10.4 \
131 --disable-libxul
132 DEFAULT_MOZILLA_TOOLKIT=mac
133 .ELSE
134 #We do not need mozilla ui, but libIDL version are decided by default toolkit.
135 #default-toolkit=xlib need libIDL < 0.68
136 #default-toolkit=gtk2 need libIDL > 0.8 (know as libIDL2)
137 DEFAULT_MOZILLA_TOOLKIT*=gtk2
138 .ENDIF # "$(GUIBASE)"=="aqua"
139 MOZILLA_CONFIGURE_FLAGS+= --enable-default-toolkit=$(DEFAULT_MOZILLA_TOOLKIT)
140 .ENDIF
142 CONFIGURE_ACTION=sh -c "./configure $(MOZILLA_CONFIGURE_FLAGS)"
144 BUILD_DIR=
145 .IF "$(USE_SHELL)"!="4nt"
146 BUILD_ACTION:=$(GNUMAKE) -j$(EXTMAXPROCESS)
147 .ELSE
148 # This construct is needed because unitools.mk defines GNUMAKE using $ENV_TOOLS.
149 # $ENV_TOOLS doesn't exist for OOo builds and the cygwin make is needed.
150 BUILD_ACTION:=make
151 .ENDIF
153 .IF "$(GUI)"=="UNX"
154 .IF "$(COMNAME)"=="sunpro5"
155 CXXFLAGS:=-features=tmplife
156 .IF "$(CPU)"=="U"
157 CXXFLAGS+=-m64
158 .ENDIF
159 .EXPORT : CXXFLAGS
160 .ENDIF # "$(COMNAME)"=="sunpro5"
161 .ENDIF
163 .IF "$(OS)"=="SOLARIS" && "$(CPUNAME)"=="SPARC" && "$(CPU)"=="U"
164 PKG_CONFIG_PATH=/usr/lib/64/pkgconfig
165 .EXPORT: PKG_CONFIG_PATH
166 MAKE=/usr/sfw/bin/gmake
167 .EXPORT: MAKE
168 CFLAGS=-I/usr/sfw/include
169 .EXPORT: CFLAGS
170 .ENDIF
171 .IF "$(COM)"=="C52" && "$(CPUNAME)"=="SPARC" && "$(CPU)"=="U"
172 CFLAGS=-m64
173 ASFLAGS=-m64
174 .EXPORT: CFLAGS ASFLAGS
175 .ENDIF
177 MOZDIR=$(MISC)$/build$/seamonkey
178 MOZTARGET=$(OS)$(COM)$(CPU)
180 .IF "$(GUI)"=="WNT"
181 # "Our" build environment uses "NO" for the environment variable that
182 # indicate if system libraries should be used, the mozilla build uses
183 # "" in this case. This conflicts (at least for W32) with mozilla (1.7b)
184 # because it disables the library checks for msvc so that
185 # --without-system-* is not evaluated. To build the included libraries
186 # the affected variables have to be empty and not NO.
187 .IF "$(SYSTEM_ZLIB)"=="NO"
188 SYSTEM_ZLIB:=
189 .EXPORT : SYSTEM_ZLIB
190 .ENDIF
191 .IF "$(SYSTEM_JPEG)"=="NO"
192 SYSTEM_JPEG:=
193 .EXPORT : SYSTEM_JPEG
194 .ENDIF
196 # For W32-tcsh CC and CXX must not contain the wrapper, and W32-4nt ( in
197 # some cases ) doesn't work with DOS path notation when building mozilla.
198 .IF "$(COM)"=="GCC"
199 CC:=$(CC:s/guw.exe //:s/ -mno-cygwin//)
200 CXX:=$(CXX:s/guw.exe //:s/ -mno-cygwin//)
201 CPP:=$(CC) -E
202 LD:=ld
203 LIBS:=-lsupc++
204 .EXPORT : CPP LIBS
205 .ELSE
206 CC:=cl.exe
207 CXX:=cl.exe
208 .ENDIF
210 # Variables to install/use our own wintools
211 MOZTOOLS_EXTRACT:=$(MISC)$/build$/moztools
212 .IF "$(USE_SHELL)"!="4nt"
213 MOZ_TOOLS_DOS:=$(shell @cygpath -ad "$(MISC)")\build\moztools\vc8-moztools
214 .IF "$(COM)"=="GCC"
215 PATH!:=$(PATH):$(shell @cygpath $(MOZ_TOOLS_DOS))/bin
216 .ELSE
217 PATH!:=$(shell @cygpath $(MOZ_TOOLS_DOS))/bin:$(PATH)
218 .ENDIF
219 .ELSE # "$(USE_SHELL)"!="4nt"
220 # MOZ_TOOLS must contain an absolute path
221 MOZ_TOOLS_DOS:=$(shell @echo %@SFN[$(MISC)])\build\moztools\vc8-moztools
222 PATH!:=$(MOZ_TOOLS_DOS)\bin;$(PATH)
223 .ENDIF # "$(USE_SHELL)"!="4nt"
225 MOZ_TOOLS:=$(subst,\,/ $(MOZ_TOOLS_DOS))
227 .EXPORT : PATH MOZ_TOOLS
228 .ENDIF # "$(GUI)"=="WNT"
230 # --- Targets ------------------------------------------------------
232 .IF "$(BUILD_MOZAB)"==""
233 all:
234 @echo "Never Build Mozilla."
235 .ENDIF
237 .INCLUDE : set_ext.mk
238 .INCLUDE : target.mk
239 .INCLUDE : tg_ext.mk
241 .IF "$(GUI)"=="WNT"
242 NEEDWINTOOLSFLAGFILE:=$(MISC)$/build$/moztools.complete
243 .ENDIF # "$(GUI)"=="WNT"
245 ALLTAR: $(NEEDWINTOOLSFLAGFILE) \
246 $(MISC)$/remove_build.flag \
247 extract_mozab_files
249 $(PACKAGE_DIR)$/$(UNTAR_FLAG_FILE) : $(MISC)$/remove_build.flag
251 # Since you never know what will be in a patch (for example, it may already
252 # patch at configure level), we remove the entire package directory if a patch
253 # is newer.
254 $(MISC)$/remove_build.flag : $(PATCH_FILE_NAME)
255 $(REMOVE_PACKAGE_COMMAND)
256 $(TOUCH) $(MISC)$/remove_build.flag
258 # Unpack/setup Windows build tools
259 .IF "$(GUI)"=="WNT"
260 $(PACKAGE_DIR)$/$(UNTAR_FLAG_FILE) : $(MISC)$/build$/moztools.complete
262 $(MISC)$/build$/moztools.unpack : $(PRJ)$/download$/$(MOZTOOLS_ZIPFILE_NAME)
263 -$(RENAME) $(MOZTOOLS_EXTRACT) $(MOZTOOLS_EXTRACT)_removeme
264 -rm -rf $(MOZTOOLS_EXTRACT)_removeme
265 @-$(MKDIRHIER) $(MOZTOOLS_EXTRACT)
266 unzip $(PRJ)$/download$/$(MOZTOOLS_ZIPFILE_NAME) -d $(MOZTOOLS_EXTRACT)
267 # chmod is also needed for W32-4nt build (when cygwin unzip is used)
268 -chmod -R +x $(MOZTOOLS_EXTRACT)$/vc8-moztools$/bin
269 $(TOUCH) $(MISC)$/build$/moztools.unpack
271 $(MISC)$/build$/moztools.complete : $(MISC)$/build$/moztools.unpack
272 $(TOUCH) $(MISC)$/build$/moztools.complete
273 .ENDIF # "$(GUI)"=="WNT"
275 zip: \
276 $(MISC)$/CREATETARBALL
278 .INCLUDE : extractfiles.mk