1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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.16.1 $
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 #************************************************************************/
36 ENABLE_EXCEPTIONS
=TRUE
38 # --- Settings -----------------------------------------------------
40 .INCLUDE
: settings.mk
42 # --- Files --------------------------------------------------------
44 # grab all .txt files under data directory, which are breakiterator rule files.
45 MY_BRK_TXTFILES
:=$(shell @ls data
/*.txt
)
47 # insert "OpenOffice" as icu package name in front of the name of each rule file for searching on application provided data
48 MY_BRK_BRKFILES
:=$(subst,data
/,$(MISC
)$/ $(MY_BRK_TXTFILES
:s
/.txt
/.brk
/))
50 # OpenOffice_dat.c is a generated file from the rule file list by gencmn
52 $(MISC
)$/OpenOffice_dat.c \
53 $(MY_BRK_BRKFILES
:s
/.brk
/_brk.c
/)
56 $(SLO
)$/breakiteratorImpl.obj \
57 $(SLO
)$/breakiterator_cjk.obj \
58 $(SLO
)$/breakiterator_ctl.obj \
59 $(SLO
)$/breakiterator_th.obj \
60 $(SLO
)$/breakiterator_unicode.obj \
61 $(SLO
)$/xdictionary.obj \
62 $(subst,$(MISC
)$/,$(SLO
)$/ $(MY_MISC_CXXFILES
:s
/.c
/.obj
/))
64 OBJFILES
= $(OBJ
)$/gendict.obj
69 DEPOBJFILES
= $(OBJ
)$/gendict.obj
70 APP1OBJS
= $(DEPOBJFILES
)
72 APP1STDLIBS
= $(SALLIB
)
74 # --- Targets ------------------------------------------------------
76 .IF
"$(SYSTEM_ICU)" == "YES"
77 GENCMN
:=$(SYSTEM_GENCMN
)
78 GENBRK
:=$(SYSTEM_GENBRK
)
79 GENCCODE
:=$(SYSTEM_GENCCODE
)
81 GENCMN
:=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)$/gencmn
82 GENBRK
:=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)$/genbrk
83 GENCCODE
:=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)$/genccode
86 $(MISC
)$/%.brk
: data
/%.txt
87 $(WRAPCMD
) $(GENBRK
) -r
$< -o
$(MISC
)$/$*.brk
89 $(MISC
)$/%_brk.c
: $(MISC
)$/%.brk
90 $(WRAPCMD
) $(GENCCODE
) -n OpenOffice
-d
$(MISC
)$ $(MISC
)$/$*.brk
92 # 'gencmn', 'genbrk' and 'genccode' are tools generated and delivered by icu project to process icu breakiterator rules.
93 # The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools,
94 # so the output (OpenOffice_icu_dat.c) is changed here to include a pragma to disable the warnings.
95 # Output of gencmn is redirected to OpenOffice_icu_tmp.c with the -t switch.
96 $(MISC
)$/OpenOffice_
%.c
: $(MY_BRK_BRKFILES
:s
/.brk
/_brk.c
/)
97 $(WRAPCMD
) $(GENCMN
) -n OpenOffice
-t tmp
-S
-d
$(MISC
) O
$(mktmp
$(subst,$(MISC
)$/, $(MY_BRK_BRKFILES
:t
"\n")))
98 echo
$(USQ
)#ifdef _MSC_VER$(USQ) > $@
99 echo
$(USQ
)#pragma warning( disable : 4229 4668 )$(USQ) >> $@
100 echo
$(USQ
)#endif$(USQ) >> $@
101 $(TYPE
) $(@
:s
/_dat
/_tmp
/) >> $@