xref: /aoo41x/main/cairo/pixman/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
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.
14#
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).
20#
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.
25#
26#*************************************************************************
27
28PRJ=..
29
30PRJNAME=cairo
31TARGET=so_pixman
32EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
33
34# --- Settings -----------------------------------------------------
35
36.INCLUDE :	settings.mk
37
38.IF  "$(ENABLE_CAIRO)" == ""
39all:
40	@echo "Nothing to do (Cairo not enabled)."
41
42.ELIF "$(BUILD_PIXMAN)" == ""
43all:
44	@echo "Not building pixman."
45
46.ENDIF
47
48# --- Files --------------------------------------------------------
49
50PIXMANVERSION=0.12.0
51
52TARFILE_NAME=pixman-$(PIXMANVERSION)
53TARFILE_MD5=09357cc74975b01714e00c5899ea1881
54
55PATCH_FILES=..$/$(TARFILE_NAME).patch
56
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)
59
60.IF "$(OS)"=="WNT"
61# --------- Windows -------------------------------------------------
62.IF "$(COM)"=="GCC"
63CONFIGURE_DIR=
64CONFIGURE_ACTION=.$/configure
65CONFIGURE_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"
66BUILD_ACTION=$(GNUMAKE)
67BUILD_FLAGS+= -j$(EXTMAXPROCESS)
68BUILD_DIR=$(CONFIGURE_DIR)
69.IF "$(GUI)$(COM)"=="WNTGCC"
70.EXPORT : PWD
71.ENDIF
72
73.ELSE   # WNT, not GCC
74BUILD_DIR=pixman
75BUILD_ACTION=$(GNUMAKE) -f Makefile.win32
76.ENDIF
77
78.ELIF "$(GUIBASE)"=="aqua"
79# ----------- Native Mac OS X (Aqua/Quartz) --------------------------------
80CONFIGURE_DIR=
81CONFIGURE_ACTION=.$/configure
82CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no CPPFLAGS="$(EXTRA_CDEFS)"
83.IF "$(SYSBASE)"!=""
84.IF "$(EXTRA_CFLAGS)"!=""
85CONFIGURE_FLAGS+=CFLAGS="$(EXTRA_CFLAGS) $(EXTRA_CDEFS)"
86.ENDIF # "$(EXTRA_CDEFS)"!=""
87.ENDIF # "$(SYSBASE)"!=""
88BUILD_ACTION=$(GNUMAKE)
89BUILD_FLAGS+= -j$(EXTMAXPROCESS)
90BUILD_DIR=$(CONFIGURE_DIR)
91
92.ELSE
93# ----------- Unix ---------------------------------------------------------
94.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
95LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
96.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
97
98.IF "$(OS)$(COM)"=="SOLARISC52"
99LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
100.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
101
102.IF "$(SYSBASE)"!=""
103pixman_CFLAGS+=-I$(SYSBASE)$/usr$/include -I$(SOLARINCDIR)$/external $(EXTRA_CFLAGS)
104.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
105LDFLAGS+=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -L$(SOLARLIBDIR) -lpthread -ldl
106.ENDIF
107.ENDIF			# "$(SYSBASE)"!=""
108
109.EXPORT: LDFLAGS
110
111.IF "$(COMNAME)"=="sunpro5"
112pixman_CFLAGS+=-xc99=none
113.ENDIF
114
115.IF "$(CPU)"=="I"
116pixman_CFLAGS+=-march=i486
117.ENDIF
118
119pixman_CFLAGS+=-fPIC
120
121CONFIGURE_DIR=
122CONFIGURE_ACTION=.$/configure
123.IF "$(CPUNAME)"=="X86_64"
124# static builds tend to fail on 64bit
125CONFIGURE_FLAGS=--enable-static=no --enable-shared=yes
126.ELSE
127# use static lib to avoid linking problems with older system pixman libs
128CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no
129.ENDIF
130CONFIGURE_FLAGS+=CFLAGS="$(pixman_CFLAGS)"
131BUILD_ACTION=$(GNUMAKE)
132BUILD_FLAGS+= -j$(EXTMAXPROCESS)
133BUILD_DIR=$(CONFIGURE_DIR)
134.ENDIF
135
136
137
138# -------- All platforms --------------------------------------------
139
140OUT2INC=pixman$/pixman-version.h  \
141	pixman$/pixman.h
142
143.IF "$(OS)"=="MACOSX"
144OUT2LIB+=pixman$/.libs$/libpixman-1.a
145.ELIF "$(OS)"=="WNT"
146.IF "$(COM)"=="GCC"
147OUT2LIB+=pixman$/.libs$/*.a
148.ELSE
149OUT2LIB+=pixman$/release$/*.lib
150.ENDIF
151.ELSE
152.IF "$(CPUNAME)"=="X86_64"
153OUT2LIB+=pixman$/.libs$/libpixman-1.so
154.ELSE
155OUT2LIB+=pixman$/.libs$/libpixman-1.a
156.ENDIF
157.ENDIF
158
159# --- Targets ------------------------------------------------------
160
161.INCLUDE : set_ext.mk
162.INCLUDE : target.mk
163.INCLUDE : tg_ext.mk
164
165