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 28# TODO: enable warnings again when external module compiles without warnings on all platforms 29EXTERNAL_WARNINGS_NOT_ERRORS := TRUE 30 31PRJ=. 32 33PRJNAME=graphite 34TARGET=so_graphite 35 36# --- Settings ----------------------------------------------------- 37 38.INCLUDE : settings.mk 39 40.IF "$(SYSTEM_GRAPHITE)" == "YES" 41 42all: 43 @echo "An already available installation of silgraphite should exist on your system." 44 @echo "Therefore the version provided here does not need to be built in addition." 45 46.ELIF "$(ENABLE_GRAPHITE)" != "TRUE" 47 48all: 49 @echo "Support for silgraphite has been disabled. Nothing to do." 50 51.ELSE 52 53# --- Files -------------------------------------------------------- 54 55TARFILE_NAME=silgraphite-2.3.1 56TARFILE_MD5=d35724900f6a4105550293686688bbb3 57PATCH_FILES=graphite-2.3.1.patch graphite-2.3.1_debug.patch 58 59# convert line-endings to avoid problems when patching 60CONVERTFILES=\ 61 engine/makefile.vc8 \ 62 engine/test/RegressionTest/RtTextSrc.h 63 64#.IF "$(OS)"=="WNT" && "$(COM)"!="GCC" 65#CONFIGURE_DIR=win32 66#.ELSE 67#CONFIGURE_DIR=engine 68#.ENDIF 69 70CONFIGURE_DIR=engine 71 72.IF "$(COM)"=="MSC" 73.IF "$(COMEX)"=="10" 74VCNUM=7 75.ELSE 76VCNUM=8 77.ENDIF 78# make use of stlport headerfiles 79EXT_USE_STLPORT=TRUE 80BUILD_ACTION=nmake VERBOSE=1 81.IF "x$(debug)"!="x" 82BUILD_FLAGS= "CFG=DEBUG" 83CFLAGSWITHPATH= $(CFLAGS:s!-Fd.!-Fd../../../../../!) 84.ELSE 85# Speed Optimization is really needed for Graphite 86CFLAGSWITHPATH= $(CFLAGS) /O2 87.ENDIF 88### convert CFLAGS as cl.exe cannot handle OOO"s generic ones directly 89### TODO: use "guw.exe" instead? 90ALLCFLAGS= $(CFLAGSWITHPATH) $(CFLAGSCXX) $(CFLAGSEXCEPTIONS) $(CDEFS) 91JUSTASLASH= / 92CFLAGS2MSC= $(ALLCFLAGS:s/-Z/$(JUSTASLASH)Z/) 93CFLAGS4MSC= $(CFLAGS2MSC:s/ -/ $(JUSTASLASH)/) 94BUILD_FLAGS+= "CFLAGS4MSC=$(CFLAGS4MSC)" /F makefile.vc$(VCNUM) lib_dll 95.ENDIF 96 97.IF "$(COM)"=="GCC" 98 99# Does linux want --disable-shared? 100.IF "x$(debug)"!="x" 101GR_CONFIGURE_FLAGS= --enable-debug=yes --disable-final --enable-static --disable-shared 102.ELSE 103GR_CONFIGURE_FLAGS= --enable-final=yes --enable-static --disable-shared 104.ENDIF 105EXTRA_GR_CXX_FLAGS=-fPIC 106 107.IF "$(USE_SYSTEM_STL)"!="YES" 108# #i112124# STLPort seems to require libstdc++ 109EXTRA_GR_LD_FLAGS=$(LIBSTLPORT) -lm -lstdc++ 110GR_LIB_PATH=LD_LIBRARY_PATH=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT) 111.ELSE 112GR_LIB_PATH= 113.ENDIF 114 115.IF "$(OS)"=="WNT" 116PATCH_FILES+=graphite-2.3.1.patch.mingw 117EXTRA_GR_CXX_FLAGS=-mthreads -nostdinc 118.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 119EXTRA_GR_CXX_FLAGS+=-shared-libgcc 120.ENDIF 121EXTRA_GR_LD_FLAGS+=-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 122.ENDIF 123 124# don't use SOLARLIB for LDFLAGS because it pulls in system graphite so build will fail 125# 126CONFIGURE_ACTION=bash -c 'CXXFLAGS="$(INCLUDE) $(CFLAGSCXX) $(CFLAGSCOBJ) $(CDEFS) $(CDEFSOBJ) $(SOLARINC) $(LFS_CFLAGS) $(EXTRA_GR_CXX_FLAGS)" $(GR_LIB_PATH) LDFLAGS="-L$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT) $(EXTRA_GR_LD_FLAGS)" ./configure $(GR_CONFIGURE_FLAGS)' 127.ENDIF 128 129BUILD_DIR=$(CONFIGURE_DIR) 130 131.IF "$(OS)"=="WNT" && "$(COM)"!="GCC" 132#OUT2LIB=win32$/bin.msvc$/*.lib 133.IF "x$(debug)"!="x" 134OUT2LIB=engine$/debug$/*.lib 135.ELSE 136OUT2LIB=engine$/release$/*.lib 137.ENDIF 138.ELSE 139OUT2LIB=engine$/src$/.libs$/libgraphite*.a 140.ENDIF 141 142.IF "$(COM)"=="GCC" 143BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) 144.ENDIF 145 146.IF "$(OS)"=="MACOSX" 147OUT2LIB+=src$/.libs$/libgraphite.*.dylib 148.ELSE 149.IF "$(OS)"=="WNT" && "$(COM)"!="GCC" 150#OUT2LIB+=engine$/src$/.libs$/libgraphite*.dll 151.IF "x$(debug)"!="x" 152OUT2BIN= \ 153# engine$/debug$/*.dll \ 154 engine$/debug$/*.pdb 155.ELSE 156OUT2BIN= 157# engine$/release$/*.dll 158# engine$/release$/*.pdb 159.ENDIF 160.ELSE 161#OUT2LIB+=engine$/src$/.libs$/libgraphite.so.*.*.* 162.ENDIF 163.ENDIF 164 165 166OUTDIR2INC= \ 167 engine$/include$/graphite 168 169.IF "$(OS)"=="WNT" 170OUT2INC=wrappers$/win32$/WinFont.h 171.ENDIF 172 173# --- Targets ------------------------------------------------------ 174 175 176.INCLUDE : set_ext.mk 177.INCLUDE : target.mk 178.INCLUDE : tg_ext.mk 179 180.ENDIF