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
"$(SYSTEM_CAIRO)" == "YES"
40 @echo
"Not building pixman."
44 # --- Files --------------------------------------------------------
48 TARFILE_NAME
=pixman-
$(PIXMANVERSION
)
49 TARFILE_MD5
=c63f411b3ad147db2bcce1bf262a0e02
51 ADDITIONAL_FILES
=Makefile.win32.common
53 PATCH_FILES
=..
$/$(TARFILE_NAME
).patch
55 .IF
"$(OS)"=="ANDROID"
56 PATCH_FILES
+=..
$/$(TARFILE_NAME
).android.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) -mthreads" LDFLAGS
="$(pixman_LDFLAGS) -no-undefined -L$(ILIB:s/;/ -L/)" 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 MMX
=on SSE2
=on CFG
=release
80 .ELIF
"$(GUIBASE)"=="aqua"
81 # ----------- Native Mac OS X (Aqua/Quartz) --------------------------------
83 CONFIGURE_ACTION
=.
$/configure
84 CONFIGURE_FLAGS
=--enable-static
=yes
--enable-shared
=no CPPFLAGS
="$(EXTRA_CDEFS)"
86 .IF
"$(EXTRA_CFLAGS)"!=""
87 CONFIGURE_FLAGS
+=CFLAGS
="$(EXTRA_CFLAGS) $(EXTRA_CDEFS)"
88 .ENDIF
# "$(EXTRA_CDEFS)"!=""
89 .ENDIF
# "$(SYSBASE)"!=""
90 .IF
"$(CROSS_COMPILING)"=="YES"
91 CONFIGURE_FLAGS
+=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
93 BUILD_ACTION
=$(GNUMAKE
)
94 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
95 BUILD_DIR
=$(CONFIGURE_DIR
)
98 # ----------- Unix ---------------------------------------------------------
99 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
100 LDFLAGS
:=-Wl
,-z
,origin -Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl
,-z
,noexecstack
101 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
103 .IF
"$(OS)$(COM)"=="SOLARISC52"
104 LDFLAGS
:=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
105 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
108 pixman_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include -I
$(SOLARINCDIR
)$/external
$(EXTRA_CFLAGS
)
109 .IF
"$(OS)"=="SOLARIS" ||
"$(OS)"=="LINUX"
110 LDFLAGS
+=-L
$(SYSBASE
)$/lib
-L
$(SYSBASE
)$/usr
$/lib
-L
$(SOLARLIBDIR
) -lpthread
-ldl
112 .ENDIF
# "$(SYSBASE)"!=""
116 .IF
"$(COMNAME)"=="sunpro5"
117 pixman_CFLAGS
+=-xc99
=none
120 .IF
"$(CPUNAME)"=="INTEL"
121 pixman_CFLAGS
+=-march
=i486
127 CONFIGURE_ACTION
=.
$/configure
130 CONFIGURE_FLAGS
=--disable-shared
132 CONFIGURE_FLAGS
=--disable-static
135 CONFIGURE_FLAGS
+=CFLAGS
="$(pixman_CFLAGS)"
137 .IF
"$(OS)"=="ANDROID"
139 # The pixman-cpu.c code wants to read /proc/<pid>/auxv, but
140 # the Android headers don't define Elf32_auxv_t.
142 # Maybe we should instead just patch the arm_has_* booleans in
143 # pixman-cpu.c to be hardcoded as TRUE and patch out the run-time
146 CONFIGURE_FLAGS
+=--disable-arm-simd
--disable-arm-neon
--disable-arm-iwmmxt
148 .ELIF
"$(OS)" == "MACOSX"
151 --prefix=/@.__________________________________________________
$(EXTRPATH
)
155 .IF
"$(CROSS_COMPILING)"=="YES"
156 CONFIGURE_FLAGS
+=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
159 BUILD_ACTION
=$(GNUMAKE
)
160 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
161 BUILD_DIR
=$(CONFIGURE_DIR
)
166 # -------- All platforms --------------------------------------------
168 OUT2INC
=pixman
$/pixman-version.h \
171 .IF
"$(OS)"=="MACOSX"
172 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.a
175 OUT2LIB
+=pixman
$/.libs
$/*.a
177 OUT2LIB
+=pixman
$/release
$/*.lib
180 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.a
182 OUT2LIB
+=pixman
$/.libs
$/libpixman-1.so
*
185 # --- Targets ------------------------------------------------------
187 .INCLUDE
: set_ext.mk