1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
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 #*************************************************************************
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
80 .IF
"$(GUIBASE)"!="aqua"
81 MOZILLA_CONFIGURE_FLAGS
+= $(SYSBASE_X11
)
84 MOZILLA_CONFIGURE_FLAGS
+= --disable-tests \
85 --enable-application
=suite \
90 --disable-profilelocking \
92 --disable-activex-scripting \
96 --disable-postscript \
97 --without-system-zlib \
99 --disable-accessibility \
100 --disable-xpfe-components \
103 --disable-profilesharing \
108 --disable-freetype2 \
110 --disable-image-encoders \
113 --enable-extensions
="pref"
116 #MOZILLA_CONFIGURE_FLAGS += --enable-system-cairo
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
125 .IF
"$(GUIBASE)"=="aqua"
126 MACDEVSDK
*=/Developer
/SDKs
/MacOSX10.4u.sdk
127 MOZILLA_CONFIGURE_FLAGS
+= \
128 --with-macos-sdk
=$(MACDEVSDK
) \
130 --enable-macos-target
=10.4 \
132 DEFAULT_MOZILLA_TOOLKIT
=mac
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
)
142 CONFIGURE_ACTION
=sh
-c
"./configure $(MOZILLA_CONFIGURE_FLAGS)"
145 .IF
"$(USE_SHELL)"!="4nt"
146 BUILD_ACTION
:=$(GNUMAKE
) -j
$(EXTMAXPROCESS
)
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.
154 .IF
"$(COMNAME)"=="sunpro5"
155 CXXFLAGS
:=-features
=tmplife
160 .ENDIF
# "$(COMNAME)"=="sunpro5"
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
168 CFLAGS
=-I
/usr
/sfw
/include
171 .IF
"$(COM)"=="C52" && "$(CPUNAME)"=="SPARC" && "$(CPU)"=="U"
174 .EXPORT
: CFLAGS ASFLAGS
177 MOZDIR
=$(MISC
)$/build
$/seamonkey
178 MOZTARGET
=$(OS
)$(COM
)$(CPU
)
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"
189 .EXPORT
: SYSTEM_ZLIB
191 .IF
"$(SYSTEM_JPEG)"=="NO"
193 .EXPORT
: SYSTEM_JPEG
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.
199 CC
:=$(CC
:s
/guw.exe
//:s
/ -mno-cygwin
//)
200 CXX
:=$(CXX
:s
/guw.exe
//:s
/ -mno-cygwin
//)
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
\vc
8-moztools
215 PATH
!:=$(PATH
):$(shell @cygpath
$(MOZ_TOOLS_DOS
))/bin
217 PATH
!:=$(shell @cygpath
$(MOZ_TOOLS_DOS
))/bin
:$(PATH
)
219 .ELSE
# "$(USE_SHELL)"!="4nt"
220 # MOZ_TOOLS must contain an absolute path
221 MOZ_TOOLS_DOS
:=$(shell @echo
%@SFN
[$(MISC
)])\build\moztools
\vc
8-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)"==""
234 @echo
"Never Build Mozilla."
237 .INCLUDE
: set_ext.mk
242 NEEDWINTOOLSFLAGFILE
:=$(MISC
)$/build
$/moztools.complete
243 .ENDIF
# "$(GUI)"=="WNT"
245 ALLTAR
: $(NEEDWINTOOLSFLAGFILE
) \
246 $(MISC
)$/remove_build.flag \
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
254 $(MISC
)$/remove_build.flag
: $(PATCH_FILE_NAME
)
255 $(REMOVE_PACKAGE_COMMAND
)
256 $(TOUCH
) $(MISC
)$/remove_build.flag
258 # Unpack/setup Windows build tools
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"
276 $(MISC
)$/CREATETARBALL
278 .INCLUDE
: extractfiles.mk