xref: /aoo41x/main/scp2/source/ooo/makefile.mk (revision 1e1ac450)
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
23PRJ=..$/..
24
25PRJPCH=
26
27PRJNAME=scp2
28TARGET=ooo
29TARGETTYPE=CUI
30
31# --- Settings -----------------------------------------------------
32
33.INCLUDE :  settings.mk
34.INCLUDE :  i18npool/version.mk
35
36.IF "$(COM)" == "MSC"
37SCPDEFS+=-D_MSC
38.ENDIF
39
40.IF "$(BUILD_SPECIAL)"!=""
41SCPDEFS+=-DBUILD_SPECIAL
42.ENDIF
43
44.IF "$(BUILD_X64)"!=""
45SCPDEFS+=-DBUILD_X64
46.ENDIF
47
48.IF "$(PROF_EDITION)"!=""
49SCPDEFS+=-DPROF_EDITION
50.ENDIF
51
52.IF "$(GUI)"=="UNX"
53.IF "$(ENABLE_GTK)" != ""
54SCPDEFS+=-DENABLE_GTK
55PKGCONFIG_MODULES=gtk+-2.0
56.INCLUDE: pkg_config.mk
57GTK_TWO_FOUR=$(shell @+-$(PKG_CONFIG) --exists 'gtk+-2.0 >= 2.4.0' && echo YES)
58.IF "$(GTK_TWO_FOUR)" != ""
59SCPDEFS+=-DGTK_TWO_FOUR
60.ENDIF
61.ENDIF
62.ENDIF			# "$(GUI)"=="UNX"
63
64.IF "$(ENABLE_SYSTRAY_GTK)" != ""
65SCPDEFS+=-DENABLE_SYSTRAY_GTK
66.ENDIF
67
68.IF "$(ENABLE_GSTREAMER)" != ""
69SCPDEFS+=-DENABLE_GSTREAMER
70.ENDIF
71
72.IF "$(ENABLE_KDE)" != ""
73SCPDEFS+=-DENABLE_KDE
74.ENDIF
75
76.IF "$(ENABLE_KDE4)" != ""
77SCPDEFS+=-DENABLE_KDE4
78.ENDIF
79
80.IF "$(ENABLE_KAB)" != ""
81SCPDEFS+=-DENABLE_KAB
82.ENDIF
83
84.IF "$(ENABLE_EVOAB2)" != ""
85SCPDEFS+=-DENABLE_EVOAB2
86.ENDIF
87
88.IF "$(ENABLE_DIRECTX)" != ""
89SCPDEFS+=-DENABLE_DIRECTX
90.ENDIF
91
92.IF "$(SYSTEM_FREETYPE)" == "YES"
93SCPDEFS+=-DSYSTEM_FREETYPE
94.ENDIF
95
96.IF "$(SYSTEM_CAIRO)" == "YES"
97SCPDEFS+=-DSYSTEM_CAIRO
98.ENDIF
99
100.IF "$(ENABLE_CAIRO)" == "YES"
101SCPDEFS+=-DENABLE_CAIRO
102.ENDIF
103
104.IF "$(SYSTEM_LIBXML)" == "YES"
105SCPDEFS+=-DSYSTEM_LIBXML
106.ENDIF
107
108.IF "$(SYSTEM_LIBWPD)" == "YES"
109SCPDEFS+=-DSYSTEM_LIBWPD
110.ENDIF
111
112.IF "$(SYSTEM_LIBXSLT)" == "YES"
113SCPDEFS+=-DSYSTEM_LIBXSLT
114.ELSE
115.INCLUDE :  libxsltversion.mk
116SCPDEFS+=-DLIBXSLT_MAJOR=$(LIBXSLT_MAJOR)
117.ENDIF
118
119.IF "$(WITH_MYSPELL_DICTS)" == "NO"
120SCPDEFS+=-DWITHOUT_MYSPELL_DICTS
121.ENDIF
122
123.IF "$(ENABLE_NSS_MODULE)" == "YES"
124SCPDEFS+=-DENABLE_XMLSEC
125    .IF "$(SYSTEM_NSS)" != "YES"
126    SCPDEFS+=-DBUNDLE_NSS_LIBS
127    .ENDIF
128.ENDIF
129
130.IF "$(WITH_LDAP)" == "YES"
131SCPDEFS+=-DWITH_LDAP
132.ENDIF
133
134.IF "$(SYSTEM_CURL)" == "YES"
135SCPDEFS+=-DSYSTEM_CURL
136.ENDIF
137
138.IF "$(SYSTEM_STDLIBS)" == "YES"
139SCPDEFS+=-DSYSTEM_STDLIBS
140.ENDIF
141
142.IF "$(SYSTEM_SNDFILE)" == "YES"
143SCPDEFS+=-DSYSTEM_SNDFILE
144.ENDIF
145
146.IF "$(SYSTEM_PORTAUDIO)" == "YES"
147SCPDEFS+=-DSYSTEM_PORTAUDIO
148.ENDIF
149
150.IF "$(SYSTEM_HUNSPELL)" == "YES"
151SCPDEFS+=-DSYSTEM_HUNSPELL
152.ENDIF
153
154.IF "$(SYSTEM_REDLAND)" == "YES"
155SCPDEFS+=-DSYSTEM_REDLAND
156.ELSE
157.INCLUDE :  redlandversion.mk
158SCPDEFS+=\
159    -DRAPTOR_MAJOR=$(RAPTOR_MAJOR) \
160    -DRASQAL_MAJOR=$(RASQAL_MAJOR) \
161    -DREDLAND_MAJOR=$(REDLAND_MAJOR)
162.ENDIF
163
164.IF "$(SYSTEM_BSH)" == "YES"
165SCPDEFS+=-DSYSTEM_BSH -DBSH_JAR=\""file://$(BSH_JAR)"\"
166.ENDIF
167
168.IF "$(ENABLE_BEANSHELL)" == "YES"
169SCPDEFS+=-DENABLE_BEANSHELL
170.ENDIF
171
172.IF "$(ENABLE_JAVASCRIPT)" == "YES"
173SCPDEFS+=-DENABLE_JAVASCRIPT
174.ENDIF
175
176.IF "$(SYSTEM_HSQLDB)" == "YES"
177SCPDEFS+=-DSYSTEM_HSQLDB -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\"
178.ENDIF
179
180.IF "$(SYSTEM_SAXON)" == "YES"
181SCPDEFS+=-DSYSTEM_SAXON -DSAXON_JAR=\""file://$(SAXON_JAR)"\"
182.ENDIF
183
184.IF "$(DISABLE_SAXON)" == "YES"
185SCPDEFS+=-DDISABLE_SAXON
186.ENDIF
187
188.IF "$(DISABLE_LIBWPD)" == "TRUE"
189SCPDEFS+=-DDISABLE_LIBWPD
190.ENDIF
191
192.IF "$(ENABLE_HUNSPELL)" != "YES"
193SCPDEFS+=-DDISABLE_HUNSPELL
194.ENDIF
195
196.IF "$(ENABLE_HYPHEN)" != "YES"
197SCPDEFS+=-DDISABLE_HYPHEN
198.ENDIF
199
200.IF "$(JDK)" == "gcj"
201SCPDEFS+=-DGCJ
202.ENDIF
203
204
205.IF "$(ENABLE_CAIRO)" == "TRUE"
206SCPDEFS+=-DENABLE_CAIRO
207.ENDIF
208
209.IF "$(SYSTEM_LUCENE)" == "YES"
210SCPDEFS+=-DSYSTEM_LUCENE
211.ENDIF
212
213.IF "$(SYSTEM_ICU)" == "YES"
214SCPDEFS+=-DSYSTEM_ICU
215.ELSE
216.INCLUDE :  icuversion.mk
217SCPDEFS+=\
218    -DICU_MAJOR=$(ICU_MAJOR) \
219    -DICU_MINOR=$(ICU_MINOR) \
220    -DICU_MICRO=$(ICU_MICRO)
221.ENDIF
222
223SCPDEFS+=-DISOLANG_MAJOR=$(ISOLANG_MAJOR)
224
225.IF "$(SYSTEM_NEON)" == "YES"
226SCPDEFS+=-DSYSTEM_NEON
227.ENDIF
228
229# if yes or unset (neon not used) -> do not install openssl library!
230.IF $(SYSTEM_OPENSSL) != "YES"
231SCPDEFS+=-DOPENSSL
232.ENDIF
233
234.IF "$(DISABLE_ATL)"!=""
235SCPDEFS+=-DDISABLE_ATL
236.ENDIF
237
238# Detect version numbers for apr, apr-util, serf.
239.IF "$(SYSTEM_APR)"!="YES"
240.INCLUDE : apr_version.mk
241SCPDEFS+=\
242    -DAPR_MAJOR=$(APR_MAJOR)		\
243    -DAPR_MINOR=$(APR_MINOR)		\
244    -DAPR_MICRO=$(APR_MICRO)
245.ENDIF
246.IF "$(SYSTEM_APR_UTIL)"!="YES"
247.INCLUDE : aprutil_version.mk
248SCPDEFS+=\
249    -DAPR_UTIL_MAJOR=$(APR_UTIL_MAJOR)	\
250    -DAPR_UTIL_MINOR=$(APR_UTIL_MINOR)	\
251    -DAPR_UTIL_MICRO=$(APR_UTIL_MICRO)
252.ENDIF
253.IF "$(SYSTEM_SERF)"!="YES"
254.INCLUDE : serf_version.mk
255SCPDEFS+=\
256    -DSERF_MAJOR=$(SERF_MAJOR)		\
257    -DSERF_MINOR=$(SERF_MINOR)		\
258    -DSERF_MICRO=$(SERF_MICRO)
259.ENDIF
260
261.IF "$(SYSTEM_PYTHON)" == "YES"
262SCPDEFS+=-DSYSTEM_PYTHON
263.ENDIF
264
265.IF "$(SYSTEM_LIBTEXTCAT)" == "YES"
266SCPDEFS+=-DSYSTEM_LIBTEXTCAT
267.ENDIF
268
269.IF "$(SYSTEM_LIBTEXTCAT_DATA)" != ""
270SCPDEFS+=-DSYSTEM_LIBTEXTCAT_DATA
271.ENDIF
272
273.IF "$(ENABLE_SVCTAGS)" == "YES"
274SCPDEFS+=-DENABLE_SVCTAGS
275.ENDIF
276
277.IF "$(WITH_VC_REDIST)" == "YES"
278SCPDEFS+=-DWITH_VC_REDIST
279.ENDIF
280
281.IF "$(MINGW_GCCDLL)"!=""
282SCPDEFS+=-DMINGW_GCCDLL=\""$(MINGW_GCCDLL)"\"
283.ENDIF
284
285.IF "$(MINGW_GXXDLL)"!=""
286SCPDEFS+=-DMINGW_GXXDLL=\""$(MINGW_GXXDLL)"\"
287.ENDIF
288
289.IF "$(SYSTEM_GDKPIXBUF)" == "YES"
290SCPDEFS+=-DSYSTEM_GDKPIXBUF
291.ENDIF
292
293.IF "$(SYSTEM_GETTEXT)" == "YES"
294SCPDEFS+=-DSYSTEM_GETTEXT
295.ENDIF
296
297.IF "$(SYSTEM_GLIB)" == "YES"
298SCPDEFS+=-DSYSTEM_GLIB
299.ENDIF
300
301.IF "$(SYSTEM_LIBJPEG)" == "YES"
302SCPDEFS+=-DSYSTEM_LIBJPEG
303.ENDIF
304
305.IF "$(SYSTEM_PANGO)" == "YES"
306SCPDEFS+=-DSYSTEM_PANGO
307.ENDIF
308
309.IF "${MACOSX_DEPLOYMENT_TARGET}" != ""
310SCPDEFS+=-DMACOSX_DEPLOYMENT_TARGET_NUM=${MACOSX_DEPLOYMENT_TARGET:s/.//}
311.ENDIF
312
313# The variables ENABLE_ONLINE_UPDATE, WITHOUT_MATHMLDTD, WITH_CATA_FONTS, WITH_CATB_FONTS,
314# and WITHOUT_PPDS are added (or not) in configure to SCPDEFS.
315
316SCP_PRODUCT_TYPE=osl
317
318ICUVERSION_DEPENDENT_FILES= \
319		$(PAR)$/$(SCP_PRODUCT_TYPE)$/file_library_ooo.par \
320		$(PAR)$/$(SCP_PRODUCT_TYPE)$/shortcut_ooo.par
321
322ISOLANGVERSION_DEPENDENT_FILES= \
323		$(PAR)$/$(SCP_PRODUCT_TYPE)$/file_library_ooo.par
324
325PARFILES=                          \
326        installation_ooo.par       \
327        scpaction_ooo.par          \
328        directory_ooo.par          \
329        directory_ooo_macosx.par   \
330        datacarrier_ooo.par        \
331        file_ooo.par               \
332        file_extra_ooo.par         \
333        file_font_ooo.par          \
334        file_library_ooo.par       \
335        file_resource_ooo.par      \
336        file_improvement.par       \
337        shortcut_ooo.par           \
338        module_ooo.par             \
339        module_hidden_ooo.par      \
340        module_langpack.par        \
341        module_lang_template.par   \
342        module_java.par            \
343        module_systemint.par       \
344        module_improvement.par     \
345        profile_ooo.par            \
346        profileitem_ooo.par        \
347        ure.par                    \
348        ure_into_ooo.par           \
349        ure_standalone.par	   \
350        common_brand.par           \
351        common_brand_readme.par    \
352	ooo_brand.par
353
354
355.IF "$(GUI)"=="WNT"
356PARFILES +=                        \
357        file_jre_ooo.par           \
358        folder_ooo.par             \
359        folderitem_ooo.par         \
360        registryitem_ooo.par       \
361        vc_redist.par              \
362        windowscustomaction_ooo.par
363.ENDIF
364
365ULFFILES=                          \
366        directory_ooo.ulf          \
367        folderitem_ooo.ulf         \
368        module_ooo.ulf             \
369        module_langpack.ulf        \
370        module_java.ulf            \
371        registryitem_ooo.ulf       \
372        module_systemint.ulf
373
374# --- File ---------------------------------------------------------
375.INCLUDE :  target.mk
376
377.IF "$(SYSTEM_ICU)" != "YES"
378$(ICUVERSION_DEPENDENT_FILES) : $(SOLARINCDIR)$/icuversion.mk
379.ENDIF
380
381$(ISOLANGVERSION_DEPENDENT_FILES) : $(SOLARINCDIR)$/i18npool/version.mk
382
383