merge the formfield patch from ooo-build
[ooovba.git] / writerfilter / source / ooxml / makefile.mk
blob73f1641b22ed83e66b570588852709b83dd6ee02
1 #************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.17 $
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 # ***********************************************************************/
32 PRJ=..$/..
33 PRJNAME=writerfilter
34 TARGET=ooxml
35 #LIBTARGET=NO
36 #USE_DEFFILE=TRUE
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
47 NAMESPACES= \
48 wml \
49 dml-stylesheet \
50 dml-styleDefaults \
51 dml-shape3DLighting \
52 dml-shape3DScene \
53 dml-shape3DStyles \
54 dml-shape3DCamera \
55 dml-baseStylesheet \
56 dml-textCharacter \
57 dml-shapeEffects \
58 dml-shapeLineProperties \
59 dml-shapeProperties \
60 dml-baseTypes \
61 dml-documentProperties \
62 dml-graphicalObject \
63 dml-shapeGeometry \
64 dml-wordprocessingDrawing \
65 sml-customXmlMappings \
66 shared-math \
67 shared-relationshipReference \
68 dml-chartDrawing \
69 vml-main \
70 vml-officeDrawing \
71 vml-wordprocessingDrawing
73 # --- Files --------------------------------------------------------
75 SLOFASTNAMESPACES= \
76 $(SLO)$/OOXMLfastresources_{$(NAMESPACES)}.obj
78 SLOFILES= \
79 $(SLOFASTNAMESPACES) \
80 $(SLO)$/OOXMLBinaryObjectReference.obj\
81 $(SLO)$/OOXMLfastresources.obj \
82 $(SLO)$/OOXMLvalues.obj \
83 $(SLO)$/OOXMLPropertySetImpl.obj \
84 $(SLO)$/OOXMLParserState.obj \
85 $(SLO)$/Handler.obj \
86 $(SLO)$/OOXMLDocumentImpl.obj \
87 $(SLO)$/OOXMLStreamImpl.obj \
88 $(SLO)$/OOXMLFastDocumentHandler.obj \
89 $(SLO)$/OOXMLFastContextHandler.obj \
90 $(SLO)$/OOXMLFastTokenHandler.obj
93 SHL1TARGET=$(TARGET)
95 .IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
96 RESOURCEMODELLIB=-lresourcemodel
97 .ELIF "$(GUI)"=="OS2"
98 RESOURCEMODELLIB=$(LB)$/iresourcemodel.lib
99 .ELIF "$(GUI)"=="WNT"
100 .IF "$(COM)"=="GCC"
101 RESOURCEMODELLIB=-lresourcemodel
102 .ELSE
103 RESOURCEMODELLIB=$(LB)$/iresourcemodel.lib
104 .ENDIF
105 .ENDIF
107 SHL1STDLIBS=$(SALLIB)\
108 $(CPPULIB)\
109 $(CPPUHELPERLIB) \
110 $(COMPHELPERLIB) \
111 $(RESOURCEMODELLIB)
112 SHL1IMPLIB=i$(SHL1TARGET)
113 SHL1USE_EXPORTS=name
115 SHL1OBJS=$(SLOFILES)
117 SHL1DEF=$(MISC)$/$(SHL1TARGET).def
118 DEF1NAME=$(SHL1TARGET)
119 DEFLIB1NAME=$(TARGET)
121 # --- Targets ------------------------------------------------------
123 .INCLUDE : target.mk
125 .PHONY : test
127 test:
128 echo $(SLOFILES)
130 OOXMLCXXOUTDIR=$(MISC)
131 OOXMLHXXOUTDIR=$(INCCOM)/ooxml
132 OOXMLHXXOUTDIRCREATED=$(OOXMLHXXOUTDIR)/created
134 OOXMLFASTRESOURCECXXS=$(OOXMLCXXOUTDIR)$/OOXMLfastresources_{$(NAMESPACES)}.cxx
135 OOXMLFASTRESOURCEHXXS=$(OOXMLHXXOUTDIR)$/OOXMLfastresources_{$(NAMESPACES)}.hxx
137 OOXMLMODEL=model.xml
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
169 OOXMLGENHEADERS= \
170 $(OOXMLFASTRESOURCESHXX) \
171 $(OOXMLFASTTOKENSHXX) \
172 $(OOXMLVALUESHXX) \
173 $(OOXMLFASTRESOURCEHXXS) \
174 $(GPERFFASTTOKENHXX) \
175 $(OOXMLRESOURCEIDSHXX) \
176 $(OOXMLNAMESPACEIDSHXX)
178 GENERATEDFILES= \
179 $(OOXMLGENHEADERS) \
180 $(MODELPROCESSED) \
181 $(OOXMLFASTRESOURCECXXS) \
182 $(OOXMLVALUESCXX) \
183 $(TOKENXMLTMP) \
184 $(TOKENXML)
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)
204 @$(TOUCH) $@
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) \
243 $(MODELPROCESSED)
244 @echo "Making: " $(@:f)
245 $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED) > $@
247 $(OOXMLNAMESPACEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLNAMESPACEIDSXSL) \
248 $(MODELPROCESSED)
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
270 genclean:
271 @rm -f $(GENERATEDFILES)
273 genmake: $(GENERATEDFILES)
275 genheaders: $(OOXMLFASTRESOURCEHXXS)