1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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 #*************************************************************************
32 EXTERNAL_WARNINGS_NOT_ERRORS
:= TRUE
34 # --- Settings -----------------------------------------------------
36 .INCLUDE
: settings.mk
38 .IF
"$(ENABLE_CAIRO)" == ""
40 @echo
"Nothing to do (Cairo not enabled)."
42 .ELIF
"$(BUILD_PIXMAN)" == ""
44 @echo
"Not building pixman."
48 # --- Files --------------------------------------------------------
52 TARFILE_NAME
=pixman-
$(PIXMANVERSION
)
53 TARFILE_MD5
=09357cc74975b01714e00c5899ea1881
55 PATCH_FILES
=..
$/$(TARFILE_NAME
).patch
57 # Note: we are building static pixman library to avoid linking problems.
58 # However, for Unix dynamic library must be used (especially due to 64bit issues)
61 # --------- Windows -------------------------------------------------
64 CONFIGURE_ACTION
=.
$/configure
65 CONFIGURE_FLAGS
=--enable-static
=yes
--enable-shared
=no
--build
=i586-pc-mingw32
--host
=i586-pc-mingw32 CFLAGS
="$(pixman_CFLAGS) -mthreads" LDFLAGS
="$(pixman_LDFLAGS) -no-undefined -L$(ILIB:s/;/ -L/)" OBJDUMP
="$(WRAPCMD) objdump"
66 BUILD_ACTION
=$(GNUMAKE
)
67 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
68 BUILD_DIR
=$(CONFIGURE_DIR
)
69 .IF
"$(GUI)$(COM)"=="WNTGCC"
75 BUILD_ACTION
=$(GNUMAKE
) -f Makefile.win32
78 .ELIF
"$(GUIBASE)"=="aqua"
79 # ----------- Native Mac OS X (Aqua/Quartz) --------------------------------
81 CONFIGURE_ACTION
=.
$/configure
82 CONFIGURE_FLAGS
=--enable-static
=yes
--enable-shared
=no CPPFLAGS
="$(EXTRA_CDEFS)"
84 .IF
"$(EXTRA_CFLAGS)"!=""
85 CONFIGURE_FLAGS
+=CFLAGS
="$(EXTRA_CFLAGS) $(EXTRA_CDEFS)"
86 .ENDIF
# "$(EXTRA_CDEFS)"!=""
87 .ENDIF
# "$(SYSBASE)"!=""
88 BUILD_ACTION
=$(GNUMAKE
)
89 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
90 BUILD_DIR
=$(CONFIGURE_DIR
)
93 # ----------- Unix ---------------------------------------------------------
94 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
95 LDFLAGS
:=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl
,-noinhibit-exec
-Wl
,-z
,noexecstack
96 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
98 .IF
"$(OS)$(COM)"=="SOLARISC52"
99 LDFLAGS
:=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
100 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
103 pixman_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include -I
$(SOLARINCDIR
)$/external
$(EXTRA_CFLAGS
)
104 .IF
"$(OS)"=="SOLARIS" ||
"$(OS)"=="LINUX"
105 LDFLAGS
+=-L
$(SYSBASE
)$/lib
-L
$(SYSBASE
)$/usr
$/lib
-L
$(SOLARLIBDIR
) -lpthread
-ldl
107 .ENDIF
# "$(SYSBASE)"!=""
111 .IF
"$(COMNAME)"=="sunpro5"
112 pixman_CFLAGS
+=-xc99
=none
116 pixman_CFLAGS
+=-march
=i486
122 CONFIGURE_ACTION
=.
$/configure
123 .IF
"$(CPUNAME)"=="X86_64"
124 # static builds tend to fail on 64bit
125 CONFIGURE_FLAGS
=--enable-static
=no
--enable-shared
=yes
127 # use static lib to avoid linking problems with older system pixman libs
128 CONFIGURE_FLAGS
=--enable-static
=yes
--enable-shared
=no
130 CONFIGURE_FLAGS
+=CFLAGS
="$(pixman_CFLAGS)"
131 BUILD_ACTION
=$(GNUMAKE
)
132 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
133 BUILD_DIR
=$(CONFIGURE_DIR
)
138 # -------- All platforms --------------------------------------------
140 OUT2INC
=pixman
$/pixman-version.h \
143 .IF
"$(OS)"=="MACOSX"
144 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.a
147 OUT2LIB
+=pixman
$/.libs
$/*.a
149 OUT2LIB
+=pixman
$/release
$/*.lib
152 .IF
"$(CPUNAME)"=="X86_64"
153 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.so
155 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.a
159 # --- Targets ------------------------------------------------------
161 .INCLUDE
: set_ext.mk