update dev300-m58
[ooovba.git] / cairo / pixman / makefile.mk
blobb2f42b3796bf6990566b9f77c188eb0812749d51
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.1.2.2 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 PRJ=..
34 PRJNAME=cairo
35 TARGET=so_pixman
36 EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
38 # --- Settings -----------------------------------------------------
40 .INCLUDE : settings.mk
42 .IF "$(ENABLE_CAIRO)" == ""
43 all:
44 @echo "Nothing to do (Cairo not enabled)."
46 .ELIF "$(BUILD_PIXMAN)" == ""
47 all:
48 @echo "Not building pixman."
50 .ENDIF
52 # --- Files --------------------------------------------------------
54 PIXMANVERSION=0.12.0
56 TARFILE_NAME=pixman-$(PIXMANVERSION)
57 PATCH_FILE_NAME=..$/$(TARFILE_NAME).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)
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) -D_MT" LDFLAGS="$(pixman_LDFLAGS) -no-undefined -L$(ILIB:s/;/ -L/)" LIBS="-lmingwthrd" 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
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
85 BUILD_ACTION=$(GNUMAKE)
86 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
87 BUILD_DIR=$(CONFIGURE_DIR)
89 .ELSE
90 # ----------- Unix ---------------------------------------------------------
91 .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
92 LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-z,noexecstack
93 .ENDIF # "$(OS)$(COM)"=="LINUXGCC"
95 .IF "$(OS)$(COM)"=="SOLARISC52"
96 LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
97 .ENDIF # "$(OS)$(COM)"=="SOLARISC52"
99 .IF "$(SYSBASE)"!=""
100 pixman_CFLAGS+=-I$(SYSBASE)$/usr$/include -I$(SOLARINCDIR)$/external $(EXTRA_CFLAGS)
101 .IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
102 LDFLAGS+=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -L$(SOLARLIBDIR) -lpthread -ldl
103 .ENDIF
104 .ENDIF # "$(SYSBASE)"!=""
106 .EXPORT: LDFLAGS
108 .IF "$(COMNAME)"=="sunpro5"
109 pixman_CFLAGS+=-xc99=none
110 .ENDIF
112 .IF "$(CPU)"=="I"
113 pixman_CFLAGS+=-march=i486
114 .ENDIF
116 pixman_CFLAGS+=-fPIC
118 CONFIGURE_DIR=
119 CONFIGURE_ACTION=.$/configure
120 .IF "$(CPUNAME)"=="X86_64"
121 # static builds tend to fail on 64bit
122 CONFIGURE_FLAGS=--enable-static=no --enable-shared=yes
123 .ELSE
124 # use static lib to avoid linking problems with older system pixman libs
125 CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no
126 .ENDIF
127 CONFIGURE_FLAGS+=CFLAGS="$(pixman_CFLAGS)"
128 BUILD_ACTION=$(GNUMAKE)
129 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
130 BUILD_DIR=$(CONFIGURE_DIR)
131 .ENDIF
135 # -------- All platforms --------------------------------------------
137 OUT2INC=pixman$/pixman-version.h \
138 pixman$/pixman.h
140 .IF "$(OS)"=="MACOSX"
141 OUT2LIB+=pixman$/.libs$/libpixman-1.a
142 .ELIF "$(OS)"=="WNT"
143 .IF "$(COM)"=="GCC"
144 OUT2LIB+=pixman$/.libs$/*.a
145 .ELSE
146 OUT2LIB+=pixman$/release$/*.lib
147 .ENDIF
148 .ELSE
149 .IF "$(CPUNAME)"=="X86_64"
150 OUT2LIB+=pixman$/.libs$/libpixman-1.so*
151 .ELSE
152 OUT2LIB+=pixman$/.libs$/libpixman-1.a
153 .ENDIF
154 .ENDIF
156 # --- Targets ------------------------------------------------------
158 .INCLUDE : set_ext.mk
159 .INCLUDE : target.mk
160 .INCLUDE : tg_ext.mk