1
#*************************************************************************
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
# Copyright 2000, 2010 Oracle and/or its affiliates.
7
# OpenOffice.org - a multi-platform office productivity suite
9
# This file is part of OpenOffice.org.
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.
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).
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.
26
#*************************************************************************
28
# TODO: enable warnings again when external module compiles without warnings on all platforms
29
EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
36
# --- Settings -----------------------------------------------------
38
.INCLUDE : settings.mk
40
.IF "$(SYSTEM_GRAPHITE)" == "YES"
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."
46
# --- Files --------------------------------------------------------
47
.IF "$(ENABLE_GRAPHITE)"=="TRUE"
48
TARFILE_NAME=silgraphite-2.3.1
49
TARFILE_MD5=d35724900f6a4105550293686688bbb3
50
PATCH_FILES=graphite-2.3.1.patch
52
# convert line-endings to avoid problems when patching
55
engine/test/RegressionTest/RtTextSrc.h
57
#.IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
71
# make use of stlport headerfiles
73
BUILD_ACTION=nmake VERBOSE=1
74
.IF "$(debug)"=="true"
75
BUILD_FLAGS= "CFG=DEBUG"
76
CFLAGSWITHPATH= $(CFLAGS:s!-Fd.!-Fd../../../../../!)
78
# Speed Optimization is really needed for Graphite
79
CFLAGSWITHPATH= $(CFLAGS) /O2
81
### convert CFLAGS as cl.exe cannot handle OOO"s generic ones directly
82
### TODO: use "guw.exe" instead?
83
ALLCFLAGS= $(CFLAGSWITHPATH) $(CFLAGSCXX) $(CFLAGSEXCEPTIONS) $(CDEFS)
85
CFLAGS2MSC= $(ALLCFLAGS:s/-Z/$(JUSTASLASH)Z/)
86
CFLAGS4MSC= $(CFLAGS2MSC:s/ -/ $(JUSTASLASH)/)
87
BUILD_FLAGS+= "CFLAGS4MSC=$(CFLAGS4MSC)" /F makefile.vc$(VCNUM) lib_dll
92
# Does linux want --disable-shared?
93
.IF "$(debug)"=="true"
94
GR_CONFIGURE_FLAGS= --enable-debug=yes --disable-final --enable-static --disable-shared
96
GR_CONFIGURE_FLAGS= --enable-final=yes --enable-static --disable-shared
98
EXTRA_GR_CXX_FLAGS=-fPIC
100
.IF "$(USE_SYSTEM_STL)"!="YES"
101
# #i112124# STLPort seems to require libstdc++
102
EXTRA_GR_LD_FLAGS=$(LIBSTLPORT) -lm -lstdc++
103
GR_LIB_PATH=LD_LIBRARY_PATH=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)
109
PATCH_FILES+=graphite-2.3.1.patch.mingw
110
EXTRA_GR_CXX_FLAGS=-mthreads -nostdinc
111
.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
112
EXTRA_GR_CXX_FLAGS+=-shared-libgcc
114
EXTRA_GR_LD_FLAGS+=-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2
117
# don't use SOLARLIB for LDFLAGS because it pulls in system graphite so build will fail
119
CONFIGURE_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)'
122
BUILD_DIR=$(CONFIGURE_DIR)
124
.IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
125
#OUT2LIB=win32$/bin.msvc$/*.lib
126
.IF "$(debug)"=="true"
127
OUT2LIB=engine$/debug$/*.lib
129
OUT2LIB=engine$/release$/*.lib
132
OUT2LIB=engine$/src$/.libs$/libgraphite*.a
136
BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
139
.IF "$(OS)"=="MACOSX"
140
OUT2LIB+=src$/.libs$/libgraphite.*.dylib
142
.IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
143
#OUT2LIB+=engine$/src$/.libs$/libgraphite*.dll
144
.IF "$(debug)"=="true"
146
# engine$/debug$/*.dll \
150
# engine$/release$/*.dll
151
# engine$/release$/*.pdb
154
#OUT2LIB+=engine$/src$/.libs$/libgraphite.so.*.*.*
160
engine$/include$/graphite
163
OUT2INC=wrappers$/win32$/WinFont.h
169
# --- Targets ------------------------------------------------------
172
.INCLUDE : set_ext.mk