xref: /aoo41x/main/cairo/pixman/makefile.mk (revision 7871dc3e)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=..
25
26PRJNAME=cairo
27TARGET=so_pixman
28EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
29
30# --- Settings -----------------------------------------------------
31
32.INCLUDE :	settings.mk
33
34.IF  "$(ENABLE_CAIRO)" == ""
35all:
36	@echo "Nothing to do (Cairo not enabled)."
37
38.ELIF "$(BUILD_PIXMAN)" == ""
39all:
40	@echo "Not building pixman."
41
42.ENDIF
43
44# --- Files --------------------------------------------------------
45
46PIXMANVERSION=0.12.0
47
48TARFILE_NAME=pixman-$(PIXMANVERSION)
49TARFILE_MD5=09357cc74975b01714e00c5899ea1881
50
51PATCH_FILES=..$/$(TARFILE_NAME).patch
52
53# Note: we are building static pixman library to avoid linking problems.
54# However, for Unix dynamic library must be used (especially due to 64bit issues)
55
56.IF "$(OS)"=="WNT"
57# --------- Windows -------------------------------------------------
58.IF "$(COM)"=="GCC"
59CONFIGURE_DIR=
60CONFIGURE_ACTION=.$/configure
61CONFIGURE_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"
62BUILD_ACTION=$(GNUMAKE)
63BUILD_FLAGS+= -j$(EXTMAXPROCESS)
64BUILD_DIR=$(CONFIGURE_DIR)
65.IF "$(GUI)$(COM)"=="WNTGCC"
66.EXPORT : PWD
67.ENDIF
68
69.ELSE   # WNT, not GCC
70BUILD_DIR=pixman
71BUILD_ACTION=$(GNUMAKE) -f Makefile.win32
72.ENDIF
73
74.ELIF "$(GUIBASE)"=="aqua"
75# ----------- Native Mac OS X (Aqua/Quartz) --------------------------------
76CONFIGURE_DIR=
77CONFIGURE_ACTION=.$/configure
78CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no CPPFLAGS="$(EXTRA_CDEFS)"
79.IF "$(SYSBASE)"!=""
80.IF "$(EXTRA_CFLAGS)"!=""
81CONFIGURE_FLAGS+=CFLAGS="$(EXTRA_CFLAGS) $(EXTRA_CDEFS)"
82.ENDIF # "$(EXTRA_CDEFS)"!=""
83.ENDIF # "$(SYSBASE)"!=""
84BUILD_ACTION=$(GNUMAKE)
85BUILD_FLAGS+= -j$(EXTMAXPROCESS)
86BUILD_DIR=$(CONFIGURE_DIR)
87
88.ELSE
89# ----------- Unix ---------------------------------------------------------
90.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
91LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
92.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
93
94.IF "$(OS)$(COM)"=="SOLARISC52"
95LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
96.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
97
98.IF "$(SYSBASE)"!=""
99pixman_CFLAGS+=-I$(SYSBASE)$/usr$/include -I$(SOLARINCDIR)$/external $(EXTRA_CFLAGS)
100.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
101LDFLAGS+=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -L$(SOLARLIBDIR) -lpthread -ldl
102.ENDIF
103.ENDIF			# "$(SYSBASE)"!=""
104
105.EXPORT: LDFLAGS
106
107.IF "$(COMNAME)"=="sunpro5"
108pixman_CFLAGS+=-xc99=none
109.ENDIF
110
111.IF "$(CPU)"=="I"
112pixman_CFLAGS+=-march=i486
113.ENDIF
114
115pixman_CFLAGS+=-fPIC
116
117CONFIGURE_DIR=
118CONFIGURE_ACTION=.$/configure
119.IF "$(CPUNAME)"=="X86_64"
120# static builds tend to fail on 64bit
121CONFIGURE_FLAGS=--enable-static=no --enable-shared=yes
122.ELSE
123# use static lib to avoid linking problems with older system pixman libs
124CONFIGURE_FLAGS=--enable-static=yes --enable-shared=no
125.ENDIF
126CONFIGURE_FLAGS+=CFLAGS="$(pixman_CFLAGS)"
127BUILD_ACTION=$(GNUMAKE)
128BUILD_FLAGS+= -j$(EXTMAXPROCESS)
129BUILD_DIR=$(CONFIGURE_DIR)
130.ENDIF
131
132
133
134# -------- All platforms --------------------------------------------
135
136OUT2INC=pixman$/pixman-version.h  \
137	pixman$/pixman.h
138
139.IF "$(OS)"=="MACOSX"
140OUT2LIB+=pixman$/.libs$/libpixman-1.a
141.ELIF "$(OS)"=="WNT"
142.IF "$(COM)"=="GCC"
143OUT2LIB+=pixman$/.libs$/*.a
144.ELSE
145OUT2LIB+=pixman$/release$/*.lib
146.ENDIF
147.ELSE
148.IF "$(CPUNAME)"=="X86_64"
149OUT2LIB+=pixman$/.libs$/libpixman-1.so
150.ELSE
151OUT2LIB+=pixman$/.libs$/libpixman-1.a
152.ENDIF
153.ENDIF
154
155# --- Targets ------------------------------------------------------
156
157.INCLUDE : set_ext.mk
158.INCLUDE : target.mk
159.INCLUDE : tg_ext.mk
160
161