update dev300-m58
[ooovba.git] / writerfilter / source / resourcemodel / makefile.mk
blob6bb943d68d13287716bbd34c690289ab74f09d4c
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.13 $
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=resourcemodel
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
46 CDEFS+=-DWRITERFILTER_DLLIMPLEMENTATION
49 # --- Files --------------------------------------------------------
51 # work around gcc taking hours and/or OOM'ing on this file
52 NOOPTFILES= \
53 $(SLO)$/qnametostr.obj
55 NOOPTFILES= \
56 $(SLO)$/qnametostr.obj
58 SLOFILES= \
59 $(SLO)$/qnametostr.obj \
60 $(SLO)$/sprmcodetostr.obj \
61 $(SLO)$/resourcemodel.obj \
62 $(SLO)$/util.obj \
63 $(SLO)$/TagLogger.obj \
64 $(SLO)$/WW8Analyzer.obj
66 # linux 64 bit: compiler (gcc 4.2.3) fails with 'out of memory'
67 .IF "$(OUTPATH)"=="unxlngx6"
68 NOOPTFILES= \
69 $(SLO)$/qnametostr.obj
70 .ENDIF
72 SHL1TARGET=$(TARGET)
74 .IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
75 RTFTOKLIB=-lrtftok
76 DOCTOKLIB=-ldoctok
77 OOXMLLIB=-looxml
78 .ELIF "$(GUI)"=="WNT"
79 RTFTOKLIB=$(LB)$/irtftok.lib
80 DOCTOKLIB=$(LB)$/idoctok.lib
81 OOXMLLIB=$(LB)$/iooxml.lib
82 .ENDIF
84 SHL1STDLIBS=$(SALLIB)\
85 $(CPPULIB)\
86 $(CPPUHELPERLIB) \
87 $(COMPHELPERLIB)
89 SHL1IMPLIB=i$(SHL1TARGET)
90 SHL1USE_EXPORTS=name
92 SHL1OBJS=$(SLOFILES)
94 SHL1DEF=$(MISC)$/$(SHL1TARGET).def
95 DEF1NAME=$(SHL1TARGET)
96 DEFLIB1NAME=$(TARGET)
98 # --- Targets ------------------------------------------------------
100 .INCLUDE : target.mk
102 RESOURCEMODELCXXOUTDIR=$(MISC)
103 DOCTOKHXXOUTDIR=$(INCCOM)$/doctok
104 OOXMLHXXOUTDIR=$(INCCOM)$/ooxml
106 DOCTOKHXXOUTDIRCREATED=$(DOCTOKHXXOUTDIR)$/created
107 OOXMLHXXOUTDIRCREATED=$(OOXMLHXXOUTDIR)$/created
109 OOXMLMODEL=..$/ooxml$/model.xml
110 OOXMLPREPROCESSXSL=..$/ooxml$/modelpreprocess.xsl
111 OOXMLQNAMETOSTRXSL=..$/ooxml$/qnametostr.xsl
112 OOXMLANALYZERXSL=..$/ooxml$/analyzer.xsl
113 OOXMLRESOURCEIDSXSL=..$/ooxml$/resourceids.xsl
114 OOXMLRESOURCESTOOLSXSL=..$/ooxml$/resourcestools.xsl
115 DOCTOKMODEL=..$/doctok$/resources.xmi
116 DOCTOKQNAMETOSTRXSL=..$/doctok$/qnametostr.xsl
117 DOCTOKANALYZERXSL=..$/doctok$/analyzer.xsl
118 DOCTOKSPRMCODETOSTRXSL=..$/doctok$/sprmcodetostr.xsl
119 DOCTOKRESOURCEIDSXSL=..$/doctok$/resourceids.xsl
120 DOCTOKSPRMIDSXSL=..$/doctok$/sprmids.xsl
121 DOCTOKRESOURCETOOLS=..$/doctok$/resourcetools.xsl
123 MODELPROCESSED=$(MISC)$/model_preprocessed.xml
125 QNAMETOSTRCXX=$(RESOURCEMODELCXXOUTDIR)$/qnametostr.cxx
126 OOXMLQNAMETOSTRTMP=$(RESOURCEMODELCXXOUTDIR)$/OOXMLqnameToStr.tmp
127 DOCTOKQNAMETOSTRTMP=$(RESOURCEMODELCXXOUTDIR)$/DOCTOKqnameToStr.tmp
128 SPRMCODETOSTRCXX=$(RESOURCEMODELCXXOUTDIR)$/sprmcodetostr.cxx
129 SPRMCODETOSTRTMP=$(RESOURCEMODELCXXOUTDIR)$/sprmcodetostr.tmp
130 DOCTOKRESOURCEIDSHXX=$(DOCTOKHXXOUTDIR)$/resourceids.hxx
131 SPRMIDSHXX=$(DOCTOKHXXOUTDIR)$/sprmids.hxx
132 OOXMLRESOURCEIDSHXX=$(OOXMLHXXOUTDIR)$/resourceids.hxx
134 GENERATEDHEADERS=$(DOCTOKRESOURCEIDSHXX) $(OOXMLRESOURCEIDSHXX) $(SPRMIDSHXX)
135 GENERATEDFILES= \
136 $(GENERATEDHEADERS) \
137 $(QNAMETOSTRCXX) \
138 $(SPRMCODETOSTRCXX) \
139 $(MODELPROCESSED) \
140 $(OOXMLQNAMETOSTRTMP) \
141 $(DOCTOKQNAMETOSTRTMP) \
142 $(SPRMCODETOSTRTMP)
144 $(OOXMLQNAMETOSTRTMP): $(OOXMLQNAMETOSTRXSL) $(MODELPROCESSED)
145 $(XSLTPROC) $(OOXMLQNAMETOSTRXSL:s!\!/!) $(MODELPROCESSED) > $@
147 $(DOCTOKQNAMETOSTRTMP): $(DOCTOKQNAMETOSTRXSL) $(DOCTOKMODEL)
148 $(XSLTPROC) $(DOCTOKQNAMETOSTRXSL:s!\!/!) $(DOCTOKMODEL) > $@
150 $(QNAMETOSTRCXX): $(OOXMLQNAMETOSTRTMP) $(DOCTOKQNAMETOSTRTMP) qnametostrheader qnametostrfooter $(OOXMLRESOURCESTOOLSXSL) $(DOCTOKRESOURCETOOLS)
151 $(TYPE) qnametostrheader $(OOXMLQNAMETOSTRTMP) $(DOCTOKQNAMETOSTRTMP) qnametostrfooter > $@
152 $(SPRMCODETOSTRTMP): $(DOCTOKSPRMCODETOSTRXSL) $(DOCTOKMODEL)
153 $(XSLTPROC) $(DOCTOKSPRMCODETOSTRXSL:s!\!/!) $(DOCTOKMODEL) > $@
155 $(SPRMCODETOSTRCXX): sprmcodetostrheader $(SPRMCODETOSTRTMP) sprmcodetostrfooter
156 $(TYPE) $< > $@
158 $(SLO)$/sprmcodetostr.obj: $(SPRMCODETOSTRCXX)
159 $(SLO)$/qnametostr.obj: $(QNAMETOSTRCXX)
161 $(SLOFILES): $(GENERATEDHEADERS)
163 $(DOCTOKHXXOUTDIRCREATED):
164 $(MKDIRHIER) $(DOCTOKHXXOUTDIR)
165 $(TOUCH) $@
167 $(DOCTOKRESOURCEIDSHXX): $(DOCTOKHXXOUTDIRCREATED) $(DOCTOKRESOURCETOOLS) $(DOCTOKRESOURCEIDSXSL)
168 $(XSLTPROC) $(DOCTOKRESOURCEIDSXSL:s!\!/!) $(DOCTOKMODEL) > $@
170 $(OOXMLHXXOUTDIRCREATED):
171 $(MKDIRHIER) $(OOXMLHXXOUTDIR)
172 $(TOUCH) $@
174 $(MODELPROCESSED): $(OOXMLMODEL) $(OOXMLRESOURCESTOOLSXSL) $(OOXMLPREPROCESSXSL)
175 $(XSLTPROC) $(OOXMLPREPROCESSXSL:s!\!/!) $(OOXMLMODEL) > $@
177 $(OOXMLRESOURCEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLRESOURCESTOOLSXSL) $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED)
178 $(XSLTPROC) $(OOXMLRESOURCEIDSXSL:s!\!/!) $(MODELPROCESSED) > $@
180 $(SPRMIDSHXX): $(DOCTOKHXXOUTDIRCREATED) $(DOCTOKSPRMIDSXSL) $(DOCTOKMODEL)
181 $(XSLTPROC) $(DOCTOKSPRMIDSXSL:s!\!/!) $(DOCTOKMODEL) > $@
183 .PHONY: genclean genmake gendirs
185 genclean:
186 rm -f $(GENERATEDFILES)
188 genmake: $(GENERATEDFILES)