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