1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21PRJ=..$/..
22PRJNAME=writerfilter
23TARGET=doctok
24#LIBTARGET=NO
25ENABLE_EXCEPTIONS=TRUE
26#USE_DEFFILE=TRUE
27#EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
28# --- Settings -----------------------------------------------------
29
30.INCLUDE :  settings.mk
31.INCLUDE :  $(PRJ)$/inc$/writerfilter.mk
32
33#CFLAGS+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
34#CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
35#CDEFS+=-DDEBUG_DOCTOK_DUMP
36
37
38# --- Files --------------------------------------------------------
39
40SLOFILES= \
41	$(SLO)$/WW8Annotation.obj \
42	$(SLO)$/WW8OutputWithDepth.obj \
43	$(SLO)$/WW8Text.obj \
44	$(SLO)$/DffImpl.obj \
45	$(SLO)$/Dff.obj \
46	$(SLO)$/WW8Picture.obj \
47	$(SLO)$/WW8Sttbf.obj \
48	$(SLO)$/WW8Table.obj \
49	$(SLO)$/WW8StyleSheet.obj \
50	$(SLO)$/WW8FontTable.obj \
51	$(SLO)$/WW8LFOTable.obj \
52	$(SLO)$/WW8ListTable.obj \
53	$(SLO)$/resources.obj \
54	$(SLO)$/WW8CpAndFc.obj \
55	$(SLO)$/WW8StructBase.obj \
56	$(SLO)$/WW8Clx.obj \
57	$(SLO)$/WW8FKPImpl.obj \
58	$(SLO)$/WW8BinTableImpl.obj \
59	$(SLO)$/WW8StreamImpl.obj \
60	$(SLO)$/WW8PropertySetImpl.obj \
61	$(SLO)$/WW8DocumentImpl.obj \
62	$(SLO)$/WW8PieceTableImpl.obj \
63	$(SLO)$/WW8ResourceModelImpl.obj
64
65
66SHL1TARGET=$(TARGET)
67
68.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC" || "$(GUI)"=="OS2"
69RESOURCEMODELLIB=-lresourcemodel
70.ELIF "$(GUI)"=="WNT"
71.IF "$(COM)"=="GCC"
72RESOURCEMODELLIB=-lresourcemodel
73.ELSE
74RESOURCEMODELLIB=$(LB)$/iresourcemodel.lib
75.ENDIF
76.ENDIF
77
78
79SHL1STDLIBS=$(SALLIB)\
80	$(CPPULIB)\
81	$(CPPUHELPERLIB) \
82	$(RESOURCEMODELLIB)
83SHL1IMPLIB=i$(SHL1TARGET)
84SHL1USE_EXPORTS=name
85
86SHL1OBJS=$(SLOFILES)
87
88SHL1DEF=$(MISC)$/$(SHL1TARGET).def
89DEF1NAME=$(SHL1TARGET)
90DEFLIB1NAME=$(TARGET)
91
92# --- Targets ------------------------------------------------------
93
94.INCLUDE :	target.mk
95
96DOCTOKHXXOUTDIR=$(INCCOM)/doctok
97DOCTOKCXXOUTDIR=$(MISC)
98DOCTOKHXXOUTDIRCREATED=$(DOCTOKHXXOUTDIR)/created
99
100DOCTOKMODEL=resources.xmi
101DOCTOKRESOURCESXSL=resources.xsl
102DOCTOKRESOURCESIMPLXSL=resourcesimpl.xsl
103DOCTOKRESOURCEIDSXSL=resourceids.xsl
104DOCTOKSPRMIDSXSL=sprmids.xsl
105DOCTOKRESOURCETOOLS=resourcetools.xsl
106
107DOCTOKRESOURCEIDSHXX=$(DOCTOKHXXOUTDIR)$/resourceids.hxx
108SPRMIDSHXX=$(DOCTOKHXXOUTDIR)$/sprmids.hxx
109RESOURCESHXX=$(DOCTOKHXXOUTDIR)$/resources.hxx
110RESOURCESCXX=$(DOCTOKCXXOUTDIR)$/resources.cxx
111
112DOCTOKGENHEADERS=$(DOCTOKRESOURCEIDSHXX) $(SPRMIDSHXX) $(RESOURCESHXX)
113DOCTOKGENFILES=$(DOCTOKGENHEADERS) $(RESOURCESCXX)
114
115$(DOCTOKHXXOUTDIRCREATED):
116	@$(MKDIRHIER) $(DOCTOKHXXOUTDIR)
117	@$(TOUCH) $@
118
119$(DOCTOKGENHEADERS): $(DOCTOKHXXOUTDIRCREATED)
120
121$(RESOURCESHXX): $(DOCTOKRESOURCESXSL) $(DOCTOKMODEL)
122	@echo "Making:   " $(@:f)
123	$(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKRESOURCESXSL) $(DOCTOKMODEL) > $@
124
125$(SPRMIDSHXX): $(DOCTOKSPRMIDSXSL) $(DOCTOKMODEL)
126	@echo "Making:   " $(@:f)
127	$(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKSPRMIDSXSL) $(DOCTOKMODEL) > $@
128
129$(RESOURCESCXX): $(DOCTOKRESOURCESIMPLXSL) $(DOCTOKMODEL) $(DOCTOKRESOURCEIDSHXX) $(DOCTOKRESOURCETOOLS)
130	@echo "Making:   " $(@:f)
131	$(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKRESOURCESIMPLXSL) $(DOCTOKMODEL) > $@
132
133$(DOCTOKRESOURCEIDSHXX):  $(DOCTOKRESOURCEIDSXSL) $(DOCTOKMODEL)
134	@echo "Making:   " $(@:f)
135	$(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKRESOURCEIDSXSL) $(DOCTOKMODEL) > $@
136
137$(SLOFILES) : $(DOCTOKGENHEADERS)
138
139.PHONY: genmake genclean
140
141genmake: $(DOCTOKGENFILES)
142
143genclean:
144	rm -f $(DOCTOKGENFILES)
145
146genheaders: $(DOCTOKGENHEADERS)
147