xref: /trunk/main/l10ntools/source/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ=..
29
30INCPRE=$(MISC)
31
32PRJNAME=l10ntools
33TARGET=transex
34TARGETTYPE=CUI
35LIBTARGET=no
36# --- Settings -----------------------------------------------------
37ENABLE_EXCEPTIONS=TRUE
38
39.INCLUDE :  settings.mk
40CDEFS+= -DYY_NEVER_INTERACTIVE=1
41#CDEFS+= -pg
42
43.IF "$(SYSTEM_EXPAT)" == "YES"
44CFLAGS+=-DSYSTEM_EXPAT
45.ENDIF
46
47
48# --- Files --------------------------------------------------------
49
50OBJFILES=   			\
51	$(OBJ)$/export.obj	\
52	$(OBJ)$/export2.obj	\
53	$(OBJ)$/merge.obj   \
54	$(OBJ)$/srciter.obj		\
55	$(OBJ)$/utf8conv.obj	\
56	$(OBJ)$/xmlparse.obj    \
57    $(OBJ)$/helpmerge.obj   \
58    $(OBJ)$/helpex.obj      \
59    $(OBJ)$/file.obj        \
60	$(OBJ)$/directory.obj
61
62
63LIB1TARGET= $(LB)$/$(TARGET).lib
64LIB1ARCHIV= $(LB)$/libtransex.a
65#LIB1FILES=  $(LB)$/transex3.lib
66LIB1OBJFILES=        $(OBJ)$/export.obj      \
67        $(OBJ)$/export2.obj     \
68        $(OBJ)$/merge.obj   \
69        $(OBJ)$/srciter.obj             \
70        $(OBJ)$/file.obj \
71		$(OBJ)$/directory.obj     \
72        $(OBJ)$/utf8conv.obj
73
74
75APP1VERSIONMAP=exports.map
76
77# extractor and merger for *.src and *.hrc
78APP1TARGET=  transex3
79#APP1OBJS=   $(OBJ)$/src_yy.obj
80APP1OBJS=   $(OBJ)$/src_yy_wrapper.obj
81
82APP1STDLIBS+= \
83            $(TOOLSLIB) \
84            $(VOSLIB) \
85            $(SALLIB)
86
87.IF "$(OS)"=="MACOSX"
88# static libs at end for OS X
89.ENDIF
90
91APP1LIBS+=	$(LB)$/$(TARGET).lib
92APP1DEPN=   $(OBJ)$/src_yy_wrapper.obj $(LB)$/$(TARGET).lib
93
94APP2TARGET= helpex
95APP2OBJS= $(OBJ)$/helpmerge.obj  $(OBJ)$/xmlparse.obj $(OBJ)$/export2.obj $(OBJ)$/utf8conv.obj $(OBJ)$/merge.obj $(OBJ)$/helpex.obj
96APP2RPATH= NONE
97
98.IF "$(OS)"!="MACOSX"
99.ENDIF
100
101APP2STDLIBS+=$(SALLIB) $(EXPATASCII3RDLIB) $(TOOLSLIB) $(VOSLIB)
102
103.IF "$(OS)"=="MACOSX"
104# static libs at end for OS X
105.ENDIF
106
107# extractor and merger for *.lng and *.lng
108APP3TARGET= ulfex
109APP3OBJS=   $(OBJ)$/lngmerge.obj $(OBJ)$/merge.obj $(OBJ)$/export2.obj $(OBJ)$/lngex.obj $(OBJ)$/utf8conv.obj
110APP3RPATH=  NONE
111
112.IF "$(OS)"!="MACOSX"
113#APP3STDLIBS+= $(BTSTRPLIB)
114.ENDIF
115APP3STDLIBS+= \
116            $(TOOLSLIB) \
117            $(VOSLIB) \
118            $(SALLIB)
119.IF "$(OS)"=="MACOSX"
120# static libs at end for OS X
121.ENDIF
122
123# encoding converter for *.gsi
124APP4TARGET= gsiconv
125APP4OBJS=   $(OBJ)$/utf8conv.obj $(OBJ)$/gsiconv.obj
126APP4STDLIBS+= \
127            $(TOOLSLIB) \
128            $(VOSLIB) \
129            $(SALLIB)
130
131# tag checker for *.gsi
132APP5TARGET= gsicheck
133APP5OBJS=   $(OBJ)$/gsicheck.obj $(OBJ)$/tagtest.obj
134APP5STDLIBS+= \
135            $(TOOLSLIB) \
136            $(VOSLIB) \
137            $(SALLIB)
138
139# extractor and merger for *.cfg
140APP6TARGET= cfgex
141APP6OBJS=   $(OBJ)$/cfgmerge.obj $(OBJ)$/cfg_yy_wrapper.obj  $(OBJ)$/merge.obj $(OBJ)$/export2.obj $(OBJ)$/utf8conv.obj
142
143.IF "$(OS)"!="MACOSX"
144#APP6STDLIBS+= $(BTSTRPLIB)
145.ENDIF
146
147APP6STDLIBS+= \
148            $(TOOLSLIB) \
149            $(VOSLIB) \
150            $(SALLIB)
151
152.IF "$(OS)"=="MACOSX"
153# static libs at end for OS X
154.ENDIF
155
156# extractor and merger for *.xrm
157APP7TARGET= xrmex
158APP7OBJS=   $(OBJ)$/xrmmerge.obj $(OBJ)$/xrm_yy_wrapper.obj $(OBJ)$/merge.obj $(OBJ)$/export2.obj $(OBJ)$/utf8conv.obj
159APP7RPATH=  NONE
160
161.IF "$(OS)"!="MACOSX"
162.ENDIF
163
164APP7STDLIBS+= \
165            $(TOOLSLIB) \
166            $(VOSLIB) \
167            $(SALLIB)
168
169.IF "$(OS)"=="MACOSX"
170# static libs at end for OS X
171.ENDIF
172
173#
174#APP8TARGET= treeconfig
175#APP8OBJS=   $(OBJ)$/treeconfig.obj $(OBJ)$/inireader.obj $(OBJ)$/export2.obj
176#APP8STDLIBS=$(TOOLSLIB) $(SALLIB) $(VOSLIB) $(ICUINLIB) $(STLPORT)
177
178# localizer for l10n framework
179APP9TARGET= localize_sl
180EXCEPTIONSFILES=                            \
181                    $(OBJ)$/localize.obj
182APP9OBJS=   $(OBJ)$/localize.obj $(OBJ)$/utf8conv.obj $(OBJ)$/srciter.obj $(OBJ)$/export2.obj $(OBJ)$/file.obj $(OBJ)$/directory.obj $(OBJ)$/treeconfig.obj $(OBJ)$/inireader.obj
183
184APP9STDLIBS+= \
185            $(TOOLSLIB) \
186            $(VOSLIB) \
187            $(ICUINLIB) \
188			$(ICUUCLIB) \
189			$(STLPORTLIB) \
190			$(SALLIB)
191
192DEPOBJFILES=$(APP1OBJS) $(APP2OBJS) $(APP3OBJS) $(APP4OBJS) $(APP5OBJS) $(APP6OBJS) $(APP7OBJS) $(APP8OBJS) $(APP9OBJS)
193
194# --- Targets ------------------------------------------------------
195
196.INCLUDE :  target.mk
197
198$(MISC)$/%_yy.c : %lex.l
199	flex -l -w -8 -o$@ $<
200
201# Helper to suppress warnings in lex generated c code, see #i57362#
202
203$(OBJ)$/src_yy_wrapper.obj: $(MISC)$/src_yy.c
204$(OBJ)$/cfg_yy_wrapper.obj: $(MISC)$/cfg_yy.c
205$(OBJ)$/xrm_yy_wrapper.obj: $(MISC)$/xrm_yy.c
206
207