update dev300-m58
[ooovba.git] / writerfilter / source / ooxml / makefile.mk
blobe63ac5e15ee6dea0a393d2c2d43c668627698002
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 TOKENXML=$(OOXMLCXXOUTDIR)$/token.xml
155 TOKENXMLTMP=$(OOXMLCXXOUTDIR)$/token.tmp
157 OOXMLFASTTOKENSHXX=$(OOXMLHXXOUTDIR)$/OOXMLFastTokens.hxx
158 OOXMLFASTRESOURCESHXX=$(OOXMLHXXOUTDIR)$/OOXMLfastresources.hxx
159 OOXMLNAMESPACEIDSHXX=$(OOXMLHXXOUTDIR)$/OOXMLnamespaceids.hxx
160 OOXMLFASTRESOURCESCXX=$(OOXMLCXXOUTDIR)$/OOXMLfastresources.cxx
161 OOXMLVALUESHXX=$(OOXMLCXXOUTDIR)$/OOXMLvalues.hxx
162 OOXMLVALUESCXX=$(OOXMLCXXOUTDIR)$/OOXMLvalues.cxx
163 GPERFFASTTOKENHXX=$(OOXMLHXXOUTDIR)$/gperffasttoken.hxx
164 MODELPROCESSED=$(MISC)$/model_preprocessed.xml
166 OOXMLGENHEADERS= \
167 $(OOXMLFASTRESOURCESHXX) \
168 $(OOXMLFASTTOKENSHXX) \
169 $(OOXMLVALUESHXX) \
170 $(OOXMLFASTRESOURCEHXXS) \
171 $(GPERFFASTTOKENHXX) \
172 $(OOXMLRESOURCEIDSHXX) \
173 $(OOXMLNAMESPACEIDSHXX)
175 GENERATEDFILES= \
176 $(OOXMLGENHEADERS) \
177 $(MODELPROCESSED) \
178 $(OOXMLFASTRESOURCECXXS) \
179 $(OOXMLVALUESCXX) \
180 $(TOKENXMLTMP) \
181 $(TOKENXML)
183 $(TOKENXMLTMP): $(SOLARVER)$/$(INPATH)$/inc$(UPDMINOREXT)$/oox$/token.txt
184 $(TYPE) $(SOLARVER)$/$(INPATH)$/inc$(UPDMINOREXT)$/oox$/token.txt | $(SED) "s#\(.*\)#<fasttoken>\1</fasttoken>#" > $@
186 $(TOKENXML): tokenxmlheader $(TOKENXMLTMP) tokenxmlfooter
187 $(TYPE) tokenxmlheader $(TOKENXMLTMP) tokenxmlfooter > $@
189 $(MODELPROCESSED): $(OOXMLPREPROCESSXSL) $(OOXMLMODEL)
190 $(XSLTPROC) $(OOXMLPREPROCESSXSL) $(OOXMLMODEL) > $@
192 $(OOXMLHXXOUTDIRCREATED):
193 $(MKDIRHIER) $(OOXMLHXXOUTDIR)
194 $(TOUCH) $@
196 $(OOXMLGENHEADERS): $(OOXMLHXXOUTDIRCREATED)
198 $(OOXMLFASTTOKENSHXX): $(OOXMLFASTTOKENSXSL) $(TOKENXML)
199 $(XSLTPROC) $(OOXMLFASTTOKENSXSL) $(TOKENXML) > $@
201 $(OOXMLFASTRESOURCESHXX): $(OOXMLFASTRESOURCESXSL) $(MODELPROCESSED)
202 $(XSLTPROC) $(OOXMLFASTRESOURCESXSL) $(MODELPROCESSED) > $@
204 $(OOXMLFASTRESOURCESCXX): $(OOXMLFASTRESOURCEHXXS) \
205 $(OOXMLFASTRESOURCESIMPLXSL) $(MODELPROCESSED)
206 $(XSLTPROC) $(OOXMLFASTRESOURCESIMPLXSL) $(MODELPROCESSED) > $@
208 $(OOXMLFASTRESOURCECXXS): $(MODELPROCESSED)
210 $(OOXMLFASTRESOURCEHXXS): $(MODELPROCESSED)
212 $(OOXMLCXXOUTDIR)$/OOXMLfastresources%.cxx: fastresourcesimpl%.xsl
213 $(XSLTPROC) $< $(MODELPROCESSED) > $@
215 $(OOXMLHXXOUTDIR)$/OOXMLfastresources%.hxx: fastresources%.xsl
216 $(XSLTPROC) $< $(MODELPROCESSED) > $@
218 $(OOXMLVALUESHXX): $(OOXMLVALUESXSL) $(MODELPROCESSED)
219 $(XSLTPROC) $(OOXMLVALUESXSL) $(MODELPROCESSED) > $@
221 $(OOXMLVALUESCXX): $(OOXMLVALUESIMPLXSL) $(MODELPROCESSED) \
222 $(OOXMLFASTRESOURCESHXX)
223 $(XSLTPROC) $(OOXMLVALUESIMPLXSL) $(MODELPROCESSED) > $@
225 $(OOXMLRESOURCEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLRESOURCEIDSXSL) \
226 $(MODELPROCESSED)
227 $(XSLTPROC) $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED) > $@
229 $(OOXMLNAMESPACEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLNAMESPACEIDSXSL) \
230 $(MODELPROCESSED)
231 $(XSLTPROC) $(OOXMLNAMESPACEIDSXSL) $(MODELPROCESSED) > $@
233 $(GPERFFASTTOKENHXX): $(OOXMLGPERFFASTTOKENXSL) $(MODELPROCESSED)
234 $(XSLTPROC) $(OOXMLGPERFFASTTOKENXSL) $(MODELPROCESSED) | tr -d '\r' | gperf -I -t -E -S1 -c -G -LC++ > $@
236 $(SLOFASTNAMESPACES): $(OOXMLFASTRESOURCESCXX) $(OOXMLGENHEADERS)
238 $(GENERATEDFILES): $(OOXMLRESOURCESTOOLSXSL)
240 $(SLOFILES): $(OOXMLGENHEADERS)
242 $(SLO)/OOXMLfastresources.obj: $(OOXMLFASTRESOURCESCXX) $(OOXMLGENHEADERS)
244 $(SLO)/OOXMLvalues.obj: $(OOXMLVALUESCXX) $(OOXMLVALUESHXX)
246 $(SLOFASTNAMESPACES): OOXMLFastHelper.hxx
248 .PHONY: genclean genmake genheaders
250 genclean:
251 rm -f $(GENERATEDFILES)
253 genmake: $(GENERATEDFILES)
255 genheaders: $(OOXMLFASTRESOURCEHXXS)