merge the formfield patch from ooo-build
[ooovba.git] / graphite / makefile.mk
blob5faa9054f98a6463edafe30014dda5fcb56e3a65
1 #*************************************************************************
3 # $RCSfile: graphite-makefile-mk.diff,v $
5 # The Contents of this file are made available subject to the terms of
6 # either of the following licenses
8 # - GNU Lesser General Public License Version 2.1
9 # - Sun Industry Standards Source License Version 1.1
11 # Sun Microsystems Inc., October, 2000
13 # GNU Lesser General Public License Version 2.1
14 # =============================================
15 # Copyright 2000 by Sun Microsystems, Inc.
16 # 901 San Antonio Road, Palo Alto, CA 94303, USA
18 # This library is free software; you can redistribute it and/or
19 # modify it under the terms of the GNU Lesser General Public
20 # License version 2.1, as published by the Free Software Foundation.
22 # This library is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 # Lesser General Public License for more details.
27 # You should have received a copy of the GNU Lesser General Public
28 # License along with this library; if not, write to the Free Software
29 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
30 # MA 02111-1307 USA
33 # Sun Industry Standards Source License Version 1.1
34 # =================================================
35 # The contents of this file are subject to the Sun Industry Standards
36 # Source License Version 1.1 (the "License"); You may not use this file
37 # except in compliance with the License. You may obtain a copy of the
38 # License at http://www.openoffice.org/license.html.
40 # Software provided under this License is provided on an "AS IS" basis,
41 # WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
42 # WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
43 # MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
44 # See the License for the specific provisions governing your rights and
45 # obligations concerning the Software.
47 # The Initial Developer of the Original Code is: Sun Microsystems, Inc.
49 # Copyright: 2000 by Sun Microsystems, Inc.
51 # All Rights Reserved.
53 # Contributor(s): _______________________________________
57 #*************************************************************************
59 # TODO: enable warnings again when external module compiles without warnings on all platforms
60 EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
62 PRJ=.
64 PRJNAME=graphite
65 TARGET=so_graphite
67 # --- Settings -----------------------------------------------------
69 .INCLUDE : settings.mk
71 # --- Files --------------------------------------------------------
72 .IF "$(ENABLE_GRAPHITE)"=="TRUE"
73 TARFILE_NAME=silgraphite-2.3.1
74 PATCH_FILES=graphite-2.3.1.patch
76 # convert line-endings to avoid problems when patching
77 CONVERTFILES=\
78 engine/makefile.vc8
80 #.IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
81 #CONFIGURE_DIR=win32
82 #.ELSE
83 #CONFIGURE_DIR=engine
84 #.ENDIF
86 CONFIGURE_DIR=engine
88 .IF "$(COM)"=="MSC"
89 .IF "$(COMEX)"=="10"
90 VCNUM=7
91 .ELSE
92 VCNUM=8
93 .ENDIF
94 # make use of stlport headerfiles
95 EXT_USE_STLPORT=TRUE
96 BUILD_ACTION=nmake VERBOSE=1
97 .IF "$(debug)"=="true"
98 BUILD_FLAGS= "CFG=DEBUG"
99 .ENDIF
100 ### convert CFLAGS as cl.exe cannot handle OOO"s generic ones directly
101 ### TODO: use "guw.exe" instead?
102 ALLCFLAGS= $(CFLAGS) $(CFLAGSCXX) $(CFLAGSEXCEPTIONS) $(CDEFS)
103 JUSTASLASH= /
104 CFLAGS2MSC= $(ALLCFLAGS:s/-Z/$(JUSTASLASH)Z/)
105 CFLAGS4MSC= $(CFLAGS2MSC:s/ -/ $(JUSTASLASH)/)
106 BUILD_FLAGS+= "MLIB=MD" "CFLAGS4MSC=$(CFLAGS4MSC)" /F makefile.vc$(VCNUM) dll
107 .ENDIF
109 .IF "$(COM)"=="GCC"
111 # Does linux want --disable-shared?
112 .IF "$(debug)"=="true"
113 GR_CONFIGURE_FLAGS= --enable-debug=yes --disable-final --enable-static --disable-shared
114 .ELSE
115 GR_CONFIGURE_FLAGS= --enable-final=yes --enable-static --disable-shared
116 .ENDIF
117 EXTRA_GR_CXX_FLAGS=-fPIC
119 .IF "$(USE_SYSTEM_STL)"!="YES"
120 EXTRA_GR_LD_FLAGS=$(LIBSTLPORT) -lm
121 GR_LIB_PATH=LD_LIBRARY_PATH=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)
122 .ELSE
123 GR_LIB_PATH=
124 .ENDIF
126 .IF "$(OS)"=="WNT"
127 PATCH_FILES+=graphite-2.3.1.patch.mingw
128 EXTRA_GR_CXX_FLAGS=-nostdinc
129 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
130 EXTRA_GR_CXX_FLAGS+=-shared-libgcc
131 .ENDIF
132 EXTRA_GR_LD_FLAGS+=-no-undefined
133 .ENDIF
135 # don't use SOLARLIB for LDFLAGS because it pulls in system graphite so build will fail
137 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)'
138 .ENDIF
140 BUILD_DIR=$(CONFIGURE_DIR)
142 .IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
143 #OUT2LIB=win32$/bin.msvc$/*.lib
144 .IF "$(debug)"=="true"
145 OUT2LIB=engine$/debug$/*.lib
146 .ELSE
147 OUT2LIB=engine$/release$/*.lib
148 .ENDIF
149 .ELSE
150 OUT2LIB=engine$/src$/.libs$/libgraphite*.a
151 .ENDIF
153 .IF "$(COM)"=="GCC"
154 BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
155 .ENDIF
157 .IF "$(OS)"=="MACOSX"
158 OUT2LIB+=src$/.libs$/libgraphite.*.dylib
159 .ELSE
160 .IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
161 #OUT2LIB+=engine$/src$/.libs$/libgraphite*.dll
162 .IF "$(debug)"=="true"
163 OUT2BIN= \
164 engine$/debug$/*.dll \
165 engine$/debug$/*.pdb
166 .ELSE
167 OUT2BIN= \
168 engine$/release$/*.dll
169 # engine$/release$/*.pdb
170 .ENDIF
171 .ELSE
172 #OUT2LIB+=engine$/src$/.libs$/libgraphite.so.*.*.*
173 .ENDIF
174 .ENDIF
177 OUTDIR2INC= \
178 engine$/include$/graphite
180 .IF "$(OS)"=="WNT"
181 OUT2INC=wrappers$/win32$/WinFont.h
182 .ENDIF
183 .ELSE
184 dddd:
185 @echo Nothing to do
186 .ENDIF
187 # --- Targets ------------------------------------------------------
190 .INCLUDE : set_ext.mk
191 .INCLUDE : target.mk
192 .INCLUDE : tg_ext.mk