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#**************************************************************
21
22
23
24PRJ = ..$/..$/..
25
26PRJNAME	= lingucomponent
27TARGET	= spell
28ENABLE_EXCEPTIONS=TRUE
29USE_DEFFILE=TRUE
30
31.IF "$(SYSTEM_HUNSPELL)" != "YES"
32HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell
33.ENDIF
34
35#----- Settings ---------------------------------------------------------
36
37.INCLUDE : settings.mk
38
39# --- Files --------------------------------------------------------
40
41.IF "$(ENABLE_HUNSPELL)" == "YES"
42
43CXXFLAGS += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
44CFLAGSCXX += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
45CFLAGSCC += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
46
47EXCEPTIONSFILES=	\
48		$(SLO)$/sspellimp.obj
49
50SLOFILES=	\
51		$(SLO)$/sreg.obj\
52		$(SLO)$/sspellimp.obj
53
54REALNAME:=$(TARGET).uno
55SHL1TARGET= $(REALNAME)$(DLLPOSTFIX)
56
57SHL1STDLIBS= \
58		$(CPPULIB) 	 \
59		$(CPPUHELPERLIB) 	 \
60        $(I18NISOLANGLIB)   \
61		$(TOOLSLIB)		\
62                $(UNOTOOLSLIB)             \
63		$(SVLLIB)		\
64		$(SALLIB)		\
65		$(LNGLIB) \
66		$(ULINGULIB) \
67		$(ICUUCLIB) \
68		$(HUNSPELLLIB)
69
70# build DLL
71SHL1LIBS=       $(SLB)$/$(TARGET).lib $(SLB)$/libulingu.lib
72SHL1IMPLIB=		i$(REALNAME)
73SHL1DEPN=		$(SHL1LIBS)
74SHL1DEF=		$(MISC)$/$(SHL1TARGET).def
75
76# Hunspell is a static library.  Avoid the definition
77#     LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport)
78#
79CDEFS+=-DHUNSPELL_STATIC
80
81SHL1VERSIONMAP=$(SOLARENV)/src/component.map
82
83# build DEF file
84DEF1NAME	 =$(SHL1TARGET)
85DEF1EXPORTFILE=	exports.dxp
86
87# --- Targets ------------------------------------------------------
88
89.INCLUDE : target.mk
90
91
92ALLTAR : $(MISC)/spell.component
93
94$(MISC)/spell.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
95        spell.component
96    $(XSLTPROC) --nonet --stringparam uri \
97        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
98        $(SOLARENV)/bin/createcomponent.xslt spell.component
99
100.ELSE
101all:
102	@echo "hunspell disabled"
103.ENDIF
104