merged tag ooo/OOO330_m14
[LibreOffice.git] / cairo / pixman / makefile.mk
blobf3c1c091639ce9c91cb5a0bbeaacc6672ee70271
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 "$(ENABLE_CAIRO)" == ""
39 all:
40 @echo "Nothing to do (Cairo not enabled)."
42 .ELIF "$(BUILD_PIXMAN)" == ""
43 all:
44 @echo "Not building pixman."
46 .ENDIF
48 # --- Files --------------------------------------------------------
50 PIXMANVERSION=0.12.0
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)
60 .IF "$(OS)"=="WNT"
61 # --------- Windows -------------------------------------------------
62 .IF "$(COM)"=="GCC"
63 CONFIGURE_DIR=
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"
70 .EXPORT : PWD
71 .ENDIF
73 .ELSE # WNT, not GCC
74 BUILD_DIR=pixman
75 BUILD_ACTION=$(GNUMAKE) -f Makefile.win32
76 .ENDIF
78 .ELIF "$(GUIBASE)"=="aqua"
79 # ----------- Native Mac OS X (Aqua/Quartz) --------------------------------
80 CONFIGURE_DIR=
81 CONFIGURE_ACTION=.$/configure
82 CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no CPPFLAGS="$(EXTRA_CDEFS)"
83 .IF "$(SYSBASE)"!=""
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)
92 .ELSE
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"
102 .IF "$(SYSBASE)"!=""
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
106 .ENDIF
107 .ENDIF # "$(SYSBASE)"!=""
109 .EXPORT: LDFLAGS
111 .IF "$(COMNAME)"=="sunpro5"
112 pixman_CFLAGS+=-xc99=none
113 .ENDIF
115 .IF "$(CPU)"=="I"
116 pixman_CFLAGS+=-march=i486
117 .ENDIF
119 pixman_CFLAGS+=-fPIC
121 CONFIGURE_DIR=
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
126 .ELSE
127 # use static lib to avoid linking problems with older system pixman libs
128 CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no
129 .ENDIF
130 CONFIGURE_FLAGS+=CFLAGS="$(pixman_CFLAGS)"
131 BUILD_ACTION=$(GNUMAKE)
132 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
133 BUILD_DIR=$(CONFIGURE_DIR)
134 .ENDIF
138 # -------- All platforms --------------------------------------------
140 OUT2INC=pixman$/pixman-version.h \
141 pixman$/pixman.h
143 .IF "$(OS)"=="MACOSX"
144 OUT2LIB+=pixman$/.libs$/libpixman-1.a
145 .ELIF "$(OS)"=="WNT"
146 .IF "$(COM)"=="GCC"
147 OUT2LIB+=pixman$/.libs$/*.a
148 .ELSE
149 OUT2LIB+=pixman$/release$/*.lib
150 .ENDIF
151 .ELSE
152 .IF "$(CPUNAME)"=="X86_64"
153 OUT2LIB+=pixman$/.libs$/libpixman-1.so
154 .ELSE
155 OUT2LIB+=pixman$/.libs$/libpixman-1.a
156 .ENDIF
157 .ENDIF
159 # --- Targets ------------------------------------------------------
161 .INCLUDE : set_ext.mk
162 .INCLUDE : target.mk
163 .INCLUDE : tg_ext.mk