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 $
11 # $Revision: 1.1.2.2 $
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 #*************************************************************************
36 EXTERNAL_WARNINGS_NOT_ERRORS
:= TRUE
38 # --- Settings -----------------------------------------------------
40 .INCLUDE
: settings.mk
42 .IF
"$(ENABLE_CAIRO)" == ""
44 @echo
"Nothing to do (Cairo not enabled)."
46 .ELIF
"$(BUILD_PIXMAN)" == ""
48 @echo
"Not building pixman."
52 # --- Files --------------------------------------------------------
56 TARFILE_NAME
=pixman-
$(PIXMANVERSION
)
57 PATCH_FILE_NAME
=..
$/$(TARFILE_NAME
).patch
59 # Note: we are building static pixman library to avoid linking problems.
60 # However, for Unix dynamic library must be used (especially due to 64bit issues)
63 # --------- Windows -------------------------------------------------
66 CONFIGURE_ACTION
=.
$/configure
67 CONFIGURE_FLAGS
=--enable-static
=yes
--enable-shared
=no
--build
=i586-pc-mingw32
--host
=i586-pc-mingw32 CFLAGS
="$(pixman_CFLAGS) -D_MT" LDFLAGS
="$(pixman_LDFLAGS) -no-undefined -L$(ILIB:s/;/ -L/)" LIBS
="-lmingwthrd" OBJDUMP
="$(WRAPCMD) objdump"
68 BUILD_ACTION
=$(GNUMAKE
)
69 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
70 BUILD_DIR
=$(CONFIGURE_DIR
)
71 .IF
"$(GUI)$(COM)"=="WNTGCC"
77 BUILD_ACTION
=$(GNUMAKE
) -f Makefile.win32
80 .ELIF
"$(GUIBASE)"=="aqua"
81 # ----------- Native Mac OS X (Aqua/Quartz) --------------------------------
83 CONFIGURE_ACTION
=.
$/configure
84 CONFIGURE_FLAGS
=--enable-static
=yes
--enable-shared
=no
85 BUILD_ACTION
=$(GNUMAKE
)
86 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
87 BUILD_DIR
=$(CONFIGURE_DIR
)
90 # ----------- Unix ---------------------------------------------------------
91 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
92 LDFLAGS
:=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl
,-z
,noexecstack
93 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
95 .IF
"$(OS)$(COM)"=="SOLARISC52"
96 LDFLAGS
:=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
97 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
100 pixman_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include -I
$(SOLARINCDIR
)$/external
$(EXTRA_CFLAGS
)
101 .IF
"$(OS)"=="SOLARIS" ||
"$(OS)"=="LINUX"
102 LDFLAGS
+=-L
$(SYSBASE
)$/lib
-L
$(SYSBASE
)$/usr
$/lib
-L
$(SOLARLIBDIR
) -lpthread
-ldl
104 .ENDIF
# "$(SYSBASE)"!=""
108 .IF
"$(COMNAME)"=="sunpro5"
109 pixman_CFLAGS
+=-xc99
=none
115 CONFIGURE_ACTION
=.
$/configure
116 CONFIGURE_FLAGS
=--enable-static
=no
--enable-shared
=yes CFLAGS
="$(pixman_CFLAGS)"
117 BUILD_ACTION
=$(GNUMAKE
)
118 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
119 BUILD_DIR
=$(CONFIGURE_DIR
)
124 # -------- All platforms --------------------------------------------
126 OUT2INC
=pixman
$/pixman-version.h \
129 .IF
"$(OS)"=="MACOSX"
130 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.a
133 OUT2LIB
+=pixman
$/.libs
$/*.a
135 OUT2LIB
+=pixman
$/release
$/*.lib
138 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.so
*
141 # --- Targets ------------------------------------------------------
143 .INCLUDE
: set_ext.mk