Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / cairo / pixman / makefile.mk
blob316d2d60af2f8f9bec17d2e02b4bc26fa8a75aad
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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 #*************************************************************************
28 PRJ=..
30 PRJNAME=cairo
31 TARGET=so_pixman
32 EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
34 # --- Settings -----------------------------------------------------
36 .INCLUDE : settings.mk
38 .IF "$(SYSTEM_CAIRO)" == "YES"
39 all:
40 @echo "Not building pixman."
42 .ENDIF
44 # --- Files --------------------------------------------------------
46 PIXMANVERSION=0.24.4
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
57 .ENDIF
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)
62 .IF "$(OS)"=="WNT"
63 # --------- Windows -------------------------------------------------
64 .IF "$(COM)"=="GCC"
65 CONFIGURE_DIR=
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"
72 .EXPORT : PWD
73 .ENDIF
75 .ELSE # WNT, not GCC
76 BUILD_DIR=pixman
77 BUILD_ACTION=$(GNUMAKE) -f Makefile.win32 MMX=on SSE2=on CFG=release
78 .ENDIF
80 .ELIF "$(GUIBASE)"=="aqua"
81 # ----------- Native Mac OS X (Aqua/Quartz) --------------------------------
82 CONFIGURE_DIR=
83 CONFIGURE_ACTION=.$/configure
84 CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no CPPFLAGS="$(EXTRA_CDEFS)"
85 .IF "$(SYSBASE)"!=""
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)
92 .ENDIF
93 BUILD_ACTION=$(GNUMAKE)
94 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
95 BUILD_DIR=$(CONFIGURE_DIR)
97 .ELSE
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"
107 .IF "$(SYSBASE)"!=""
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
111 .ENDIF
112 .ENDIF # "$(SYSBASE)"!=""
114 .EXPORT: LDFLAGS
116 .IF "$(COMNAME)"=="sunpro5"
117 pixman_CFLAGS+=-xc99=none
118 .ENDIF
120 .IF "$(CPUNAME)"=="INTEL"
121 pixman_CFLAGS+=-march=i486
122 .ENDIF
124 pixman_CFLAGS+=-fPIC
126 CONFIGURE_DIR=
127 CONFIGURE_ACTION=.$/configure
129 .IF "$(OS)"=="IOS"
130 CONFIGURE_FLAGS=--disable-shared
131 .ELSE
132 CONFIGURE_FLAGS=--disable-static
133 .ENDIF
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
144 # check?
146 CONFIGURE_FLAGS+=--disable-arm-simd --disable-arm-neon --disable-arm-iwmmxt
148 .ELIF "$(OS)" == "MACOSX"
150 CONFIGURE_FLAGS += \
151 --prefix=/@.__________________________________________________$(EXTRPATH)
153 .END
155 .IF "$(CROSS_COMPILING)"=="YES"
156 CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
157 .ENDIF
159 BUILD_ACTION=$(GNUMAKE)
160 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
161 BUILD_DIR=$(CONFIGURE_DIR)
162 .ENDIF
166 # -------- All platforms --------------------------------------------
168 OUT2INC=pixman$/pixman-version.h \
169 pixman$/pixman.h
171 .IF "$(OS)"=="MACOSX"
172 OUT2LIB+=pixman$/.libs$/libpixman-1.a
173 .ELIF "$(OS)"=="WNT"
174 .IF "$(COM)"=="GCC"
175 OUT2LIB+=pixman$/.libs$/*.a
176 .ELSE
177 OUT2LIB+=pixman$/release$/*.lib
178 .ENDIF
179 .ELIF "$(OS)"=="IOS"
180 OUT2LIB+=pixman$/.libs$/libpixman-1.a
181 .ELSE
182 OUT2LIB+=pixman$/.libs$/libpixman-1.so*
183 .ENDIF
185 # --- Targets ------------------------------------------------------
187 .INCLUDE : set_ext.mk
188 .INCLUDE : target.mk
189 .INCLUDE : tg_ext.mk