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_cairo 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 "$(SYSTEM_CAIRO)" == "YES" 39all: 40 @echo "Nothing to do, using system cairo." 41 42.ENDIF 43 44# --- Files -------------------------------------------------------- 45 46CAIROVERSION=1.8.0 47 48TARFILE_NAME=$(PRJNAME)-$(CAIROVERSION) 49TARFILE_MD5=4ea70ea87b47e92d318d4e7f5b940f47 50 51PATCH_FILES=..$/$(TARFILE_NAME).patch 52 53cairo_CFLAGS=$(SOLARINC) 54cairo_LDFLAGS=$(SOLARLIB) 55 56cairo_CPPFLAGS= 57 58.IF "$(SYSTEM_ZLIB)"!="YES" 59cairo_CPPFLAGS+=-I$(SOLARINCDIR)$/external$/zlib 60cairo_COMPRESS=z_compress 61.ELSE 62cairo_COMPRESS=compress 63.ENDIF 64cairo_CPPFLAGS+=$(INCLUDE) 65 66.IF "$(OS)"=="WNT" 67# --------- Windows ------------------------------------------------- 68.IF "$(COM)"=="GCC" 69cairo_LDFLAGS+=-no-undefined -L$(ILIB:s/;/ -L/) 70cairo_CPPFLAGS+=-nostdinc 71cairo_CC=$(CC) -mthreads 72 73.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 74cairo_CC+=-shared-libgcc 75.ENDIF 76.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 77cairo_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 78.ENDIF 79 80CONFIGURE_DIR= 81CONFIGURE_ACTION=cp $(SRC_ROOT)$/$(PRJNAME)$/cairo$/dummy_pkg_config . && .$/configure 82CONFIGURE_FLAGS=--disable-xlib --disable-ft --disable-pthread --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no --build=i586-pc-mingw32 --host=i586-pc-mingw32 PKG_CONFIG=./dummy_pkg_config CC="$(cairo_CC)" LIBS="$(cairo_LIBS)" ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) OBJDUMP="$(WRAPCMD) objdump" 83BUILD_ACTION=$(GNUMAKE) 84BUILD_FLAGS+= -j$(EXTMAXPROCESS) 85BUILD_DIR=$(CONFIGURE_DIR) 86.IF "$(GUI)$(COM)"=="WNTGCC" 87.EXPORT : PWD 88.ENDIF 89 90.ELSE # WNT, not GCC 91BUILD_ACTION=$(GNUMAKE) -f Makefile.win32 CFG=release 92BUILD_DIR= 93.ENDIF 94 95OUT2INC+=src$/cairo-win32.h 96 97.ELIF "$(GUIBASE)"=="aqua" 98# ----------- Native Mac OS X (Aqua/Quartz) -------------------------------- 99.IF "$(SYSBASE)"!="" 100.IF "$(EXTRA_CFLAGS)" != "" 101cairo_CFLAGS+=$(EXTRA_CFLAGS) $(EXTRA_CDEFS) 102cairo_CPPFLAGS+=$(EXTRA_CFLAGS) $(EXTRA_CDEFS) 103.ENDIF # "$(EXTRA_CFLAGS)" != "" 104.ENDIF # "$(SYSBASE)"!="" 105CONFIGURE_DIR= 106CONFIGURE_ACTION=cp $(SRC_ROOT)$/$(PRJNAME)$/cairo$/dummy_pkg_config . && .$/configure 107CONFIGURE_FLAGS=--enable-static=no --disable-xlib --disable-ft --disable-svg --enable-quartz --enable-quartz-font --enable-gtk-doc=no --enable-test-surfaces=no PKG_CONFIG=./dummy_pkg_config ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) 108cairo_CPPFLAGS+=$(EXTRA_CDEFS) 109cairo_LDFLAGS+=$(EXTRA_LINKFLAGS) 110BUILD_ACTION=$(GNUMAKE) 111BUILD_FLAGS+= -j$(EXTMAXPROCESS) 112BUILD_DIR=$(CONFIGURE_DIR) 113 114OUT2INC+=src$/cairo-quartz.h 115 116.ELSE 117# ----------- Unix --------------------------------------------------------- 118.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 119cairo_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec 120.ELIF "$(OS)$(COM)"=="SOLARISC52" 121cairo_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 122.ENDIF # "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 123 124.IF "$(SYSBASE)"!="" 125cairo_CFLAGS+=-I$(SYSBASE)$/usr$/include -I$(SOLARINCDIR)$/external $(EXTRA_CFLAGS) 126.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX" 127cairo_LDFLAGS+=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -L$(SOLARLIBDIR) -lpthread -ldl 128.ENDIF 129.ENDIF # "$(SYSBASE)"!="" 130 131LDFLAGS:=$(cairo_LDFLAGS) 132.EXPORT: LDFLAGS 133 134.IF "$(COMNAME)"=="sunpro5" 135cairo_CFLAGS+=-xc99=none 136.ENDIF 137 138.IF "$(CPU)"=="I" 139cairo_CFLAGS+=-march=i486 140.ENDIF 141 142CONFIGURE_DIR= 143CONFIGURE_ACTION=.$/configure 144CONFIGURE_FLAGS=--enable-xlib --enable-ft --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) 145BUILD_ACTION=$(GNUMAKE) 146BUILD_FLAGS+= -j$(EXTMAXPROCESS) 147BUILD_DIR=$(CONFIGURE_DIR) 148 149OUT2INC+=src$/cairo-xlib.h \ 150 src$/cairo-xlib-xrender.h \ 151 src$/cairo-ft.h 152 153.ENDIF 154 155 156# -------- All platforms -------------------------------------------- 157 158.IF "$(OS)" != "WNT" || "$(COM)" == "GCC" 159# all other platforms except vanilla WNT, which does not use configure 160 161.IF "$(BUILD_PIXMAN)" == "YES" 162# pixman is in this module 163# We include paths to this module also in LDFLAGS/CFLAGS to guarantee search order. 164# However pixman_* vars need to be also set for configure to work properly on all platforms. 165CONFIGURE_FLAGS+=pixman_CFLAGS="-I$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/inc" pixman_LIBS="-L$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/lib -lpixman-1" 166.ENDIF 167 168CONFIGURE_FLAGS+=CFLAGS="-I$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/inc $(cairo_CFLAGS)" LDFLAGS="-L$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/lib $(cairo_LDFLAGS)" CPPFLAGS="$(cairo_CPPFLAGS)" 169 170.ENDIF 171 172.IF "$(SYSTEM_LIBPNG)" != "YES" 173CONFIGURE_FLAGS+=png_CFLAGS="-I$(SOLARINCDIR)$/external$/libpng" png_LIBS="-L$(SOLARLIBDIR) -lpng" 174.ENDIF 175 176 177OUT2INC+=cairo-version.h \ 178 src$/cairo-deprecated.h \ 179 src$/cairo-features.h \ 180 src$/cairo-pdf.h \ 181 src$/cairo-ps.h \ 182 src$/cairo.h 183 184.IF "$(OS)"=="MACOSX" 185EXTRPATH=LOADER 186OUT2LIB+=src$/.libs$/libcairo*.dylib 187.ELIF "$(OS)"=="WNT" 188.IF "$(COM)"=="GCC" 189OUT2BIN+=src$/.libs$/*.a 190OUT2BIN+=src$/.libs$/*.dll 191.ELSE 192OUT2LIB+=src$/release$/*.lib 193OUT2BIN+=src$/release$/*.dll 194.ENDIF 195.ELSE 196OUT2LIB+=src$/.libs$/libcairo.so* 197.ENDIF 198 199# --- Targets ------------------------------------------------------ 200 201.INCLUDE : set_ext.mk 202.INCLUDE : target.mk 203.INCLUDE : tg_ext.mk 204 205