1 #************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 # ***********************************************************************/
37 ENABLE_EXCEPTIONS
=TRUE
39 # --- Settings -----------------------------------------------------
41 .INCLUDE
: settings.mk
42 .INCLUDE
: $(PRJ
)$/inc
$/writerfilter.mk
44 #CFLAGS+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
45 #CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
58 dml-shapeLineProperties \
61 dml-documentProperties \
64 dml-wordprocessingDrawing \
65 sml-customXmlMappings \
67 shared-relationshipReference \
71 vml-wordprocessingDrawing
73 # --- Files --------------------------------------------------------
76 $(SLO
)$/OOXMLfastresources_
{$(NAMESPACES
)}.obj
79 $(SLOFASTNAMESPACES
) \
80 $(SLO
)$/OOXMLBinaryObjectReference.obj\
81 $(SLO
)$/OOXMLfastresources.obj \
82 $(SLO
)$/OOXMLvalues.obj \
83 $(SLO
)$/OOXMLPropertySetImpl.obj \
84 $(SLO
)$/OOXMLParserState.obj \
86 $(SLO
)$/OOXMLDocumentImpl.obj \
87 $(SLO
)$/OOXMLStreamImpl.obj \
88 $(SLO
)$/OOXMLFastDocumentHandler.obj \
89 $(SLO
)$/OOXMLFastContextHandler.obj \
90 $(SLO
)$/OOXMLFastTokenHandler.obj
95 .IF
"$(GUI)"=="UNX" ||
"$(GUI)"=="MAC"
96 RESOURCEMODELLIB
=-lresourcemodel
98 RESOURCEMODELLIB
=$(LB
)$/iresourcemodel.lib
101 RESOURCEMODELLIB
=-lresourcemodel
103 RESOURCEMODELLIB
=$(LB
)$/iresourcemodel.lib
107 SHL1STDLIBS
=$(SALLIB
)\
112 SHL1IMPLIB
=i
$(SHL1TARGET
)
117 SHL1DEF
=$(MISC
)$/$(SHL1TARGET
).def
118 DEF1NAME
=$(SHL1TARGET
)
119 DEFLIB1NAME
=$(TARGET
)
121 # --- Targets ------------------------------------------------------
130 OOXMLCXXOUTDIR
=$(MISC
)
131 OOXMLHXXOUTDIR
=$(INCCOM
)/ooxml
132 OOXMLHXXOUTDIRCREATED
=$(OOXMLHXXOUTDIR
)/created
134 OOXMLFASTRESOURCECXXS
=$(OOXMLCXXOUTDIR
)$/OOXMLfastresources_
{$(NAMESPACES
)}.
cxx
135 OOXMLFASTRESOURCEHXXS
=$(OOXMLHXXOUTDIR
)$/OOXMLfastresources_
{$(NAMESPACES
)}.hxx
138 OOXMLPREPROCESSXSL
=modelpreprocess.xsl
139 OOXMLRESOURCESTOOLSXSL
=resourcestools.xsl
140 OOXMLRESORUCETOKENSXSL
=resourcestokens.xsl
141 OOXMLFASTTOKENSXSL
=fasttokens.xsl
142 OOXMLFASTTOKENSIMPLXSL
=fasttokensimpl.xsl
143 OOXMLFASTRESOURCESXSL
=fastresources.xsl
144 OOXMLRESOURCESIMPLXSL
=resourcesimpl.xsl
145 OOXMLFASTRESOURCESIMPLXSL
=fastresourcesimpl.xsl
146 OOXMLNAMESPACEIDSXSL
=namespaceids.xsl
147 OOXMLVALUESXSL
=values.xsl
148 OOXMLVALUESIMPLXSL
=valuesimpl.xsl
149 OOXMLRESOURCEIDSXSL
=resourceids.xsl
150 OOXMLGPERFFASTTOKENXSL
=gperffasttokenhandler.xsl
152 OOXMLRESOURCEIDSHXX
=$(OOXMLHXXOUTDIR
)$/resourceids.hxx
154 NSPROCESS
=namespace_preprocess.pl
156 TOKENXML
=$(OOXMLCXXOUTDIR
)$/token.xml
157 TOKENXMLTMP
=$(OOXMLCXXOUTDIR
)$/token.tmp
159 OOXMLFASTTOKENSHXX
=$(OOXMLHXXOUTDIR
)$/OOXMLFastTokens.hxx
160 OOXMLFASTRESOURCESHXX
=$(OOXMLHXXOUTDIR
)$/OOXMLfastresources.hxx
161 OOXMLNAMESPACEIDSHXX
=$(OOXMLHXXOUTDIR
)$/OOXMLnamespaceids.hxx
162 OOXMLFASTRESOURCESCXX
=$(OOXMLCXXOUTDIR
)$/OOXMLfastresources.
cxx
163 OOXMLVALUESHXX
=$(OOXMLCXXOUTDIR
)$/OOXMLvalues.hxx
164 OOXMLVALUESCXX
=$(OOXMLCXXOUTDIR
)$/OOXMLvalues.
cxx
165 GPERFFASTTOKENHXX
=$(OOXMLHXXOUTDIR
)$/gperffasttoken.hxx
166 MODELPROCESSED
=$(MISC
)$/model_preprocessed.xml
167 NSXSL
=$(MISC
)$/namespacesmap.xsl
170 $(OOXMLFASTRESOURCESHXX
) \
171 $(OOXMLFASTTOKENSHXX
) \
173 $(OOXMLFASTRESOURCEHXXS
) \
174 $(GPERFFASTTOKENHXX
) \
175 $(OOXMLRESOURCEIDSHXX
) \
176 $(OOXMLNAMESPACEIDSHXX
)
181 $(OOXMLFASTRESOURCECXXS
) \
186 $(TOKENXMLTMP
): $(SOLARVER
)$/$(INPATH
)$/inc
$(UPDMINOREXT
)$/oox
$/token.txt
187 @
$(TYPE
) $(SOLARVER
)$/$(INPATH
)$/inc
$(UPDMINOREXT
)$/oox
$/token.txt |
$(SED
) "s#\(.*\)#<fasttoken>\1</fasttoken>#" > $@
189 $(TOKENXML
): tokenxmlheader
$(TOKENXMLTMP
) tokenxmlfooter
190 @
$(TYPE
) tokenxmlheader
$(TOKENXMLTMP
) tokenxmlfooter
> $@
192 $(MISC
)$/$(OOXMLPREPROCESSXSL
): $(OOXMLPREPROCESSXSL
)
193 $(COPY
) $(PWD
)$/$(OOXMLPREPROCESSXSL
) $(MISC
)
195 $(NSXSL
) : $(OOXMLMODEL
) $(SOLARVER
)$/$(INPATH
)$/inc
$(UPDMINOREXT
)$/oox
$/namespaces.txt
$(NSPROCESS
)
196 $(PERL
) $(NSPROCESS
) $(SOLARVER
)$/$(INPATH
)$/inc
$(UPDMINOREXT
)$/oox
$/namespaces.txt
> $@
198 $(MODELPROCESSED
): $(NSXSL
) $(MISC
)$/$(OOXMLPREPROCESSXSL
) $(OOXMLMODEL
)
199 @echo
"Making: " $(@
:f
)
200 $(COMMAND_ECHO
)$(XSLTPROC
) $(NSXSL
) $(OOXMLMODEL
) > $@
202 $(OOXMLHXXOUTDIRCREATED
):
203 @
$(MKDIRHIER
) $(OOXMLHXXOUTDIR
)
206 $(OOXMLGENHEADERS
): $(OOXMLHXXOUTDIRCREATED
)
208 $(OOXMLFASTTOKENSHXX
): $(OOXMLFASTTOKENSXSL
) $(TOKENXML
)
209 @echo
"Making: " $(@
:f
)
210 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLFASTTOKENSXSL
) $(TOKENXML
) > $@
212 $(OOXMLFASTRESOURCESHXX
): $(OOXMLFASTRESOURCESXSL
) $(MODELPROCESSED
)
213 @echo
"Making: " $(@
:f
)
214 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLFASTRESOURCESXSL
) $(MODELPROCESSED
) > $@
216 $(OOXMLFASTRESOURCESCXX
): $(OOXMLFASTRESOURCEHXXS
) \
217 $(OOXMLFASTRESOURCESIMPLXSL
) $(MODELPROCESSED
)
218 @echo
"Making: " $(@
:f
)
219 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLFASTRESOURCESIMPLXSL
) $(MODELPROCESSED
) > $@
221 $(OOXMLFASTRESOURCECXXS
): $(MODELPROCESSED
)
223 $(OOXMLFASTRESOURCEHXXS
): $(MODELPROCESSED
)
225 $(OOXMLCXXOUTDIR
)$/OOXMLfastresources
%.
cxx: fastresourcesimpl
%.xsl
226 @echo
"Making: " $(@
:f
)
227 $(COMMAND_ECHO
)$(XSLTPROC
) $< $(MODELPROCESSED
) > $@
229 $(OOXMLHXXOUTDIR
)$/OOXMLfastresources
%.hxx
: fastresources
%.xsl
230 @echo
"Making: " $(@
:f
)
231 $(COMMAND_ECHO
)$(XSLTPROC
) $< $(MODELPROCESSED
) > $@
233 $(OOXMLVALUESHXX
): $(OOXMLVALUESXSL
) $(MODELPROCESSED
)
234 @echo
"Making: " $(@
:f
)
235 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLVALUESXSL
) $(MODELPROCESSED
) > $@
237 $(OOXMLVALUESCXX
): $(OOXMLVALUESIMPLXSL
) $(MODELPROCESSED
) \
238 $(OOXMLFASTRESOURCESHXX
)
239 @echo
"Making: " $(@
:f
)
240 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLVALUESIMPLXSL
) $(MODELPROCESSED
) > $@
242 $(OOXMLRESOURCEIDSHXX
): $(OOXMLHXXOUTDIRCREATED
) $(OOXMLRESOURCEIDSXSL
) \
244 @echo
"Making: " $(@
:f
)
245 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLRESOURCEIDSXSL
) $(MODELPROCESSED
) > $@
247 $(OOXMLNAMESPACEIDSHXX
): $(OOXMLHXXOUTDIRCREATED
) $(OOXMLNAMESPACEIDSXSL
) \
249 @echo
"Making: " $(@
:f
)
250 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLNAMESPACEIDSXSL
) $(MODELPROCESSED
) > $@
252 $(GPERFFASTTOKENHXX
): $(OOXMLGPERFFASTTOKENXSL
) $(MODELPROCESSED
)
253 @echo
"Making: " $(@
:f
)
254 $(COMMAND_ECHO
)$(XSLTPROC
) $(OOXMLGPERFFASTTOKENXSL
) $(MODELPROCESSED
) | tr
-d
'\r' | gperf
-I
-t
-E
-S1
-c
-G
-LC
++ > $@
256 $(SLOFASTNAMESPACES
): $(OOXMLFASTRESOURCESCXX
) $(OOXMLGENHEADERS
)
258 $(GENERATEDFILES
): $(OOXMLRESOURCESTOOLSXSL
)
260 $(SLOFILES
): $(OOXMLGENHEADERS
)
262 $(SLO
)/OOXMLfastresources.obj
: $(OOXMLFASTRESOURCESCXX
) $(OOXMLGENHEADERS
)
264 $(SLO
)/OOXMLvalues.obj
: $(OOXMLVALUESCXX
) $(OOXMLVALUESHXX
)
266 $(SLOFASTNAMESPACES
): OOXMLFastHelper.hxx
268 .PHONY
: genclean genmake genheaders
271 @
rm -f
$(GENERATEDFILES
)
273 genmake
: $(GENERATEDFILES
)
275 genheaders
: $(OOXMLFASTRESOURCEHXXS
)