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