1#
2# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3# Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
4# Copyright (C) DIGITEO - 2009 - Sylvestre Ledru
5#
6# Copyright (C) 2012 - 2016 - Scilab Enterprises
7#
8# This file is hereby licensed under the terms of the GNU GPL v2.0,
9# pursuant to article 5.3.4 of the CeCILL v.2.1.
10# This file was originally licensed under the terms of the CeCILL v2.1,
11# and continues to be available under such terms.
12# For more information, see the COPYING file which you should have received
13# along with this program.
14#
15
16# The order DOES matter !!!
17
18# core is the main module of Scilab. All the compilation deps has been removed
19# since it already linked almost the whole world
20
21SUBDIRS = \
22prebuildjava \
23threads \
24output_stream \
25arnoldi \
26elementary_functions \
27functions_manager \
28fileio \
29mexlib \
30functions \
31parameters \
32boolean \
33cacsd \
34signal_processing \
35core \
36call_scilab \
37api_scilab \
38data_structures \
39differential_equations \
40elementary_functions \
41integer \
42io \
43linear_algebra \
44localization \
45polynomials \
46special_functions \
47time \
48windows_tools \
49sparse \
50completion \
51history_manager \
52output_stream \
53string \
54hdf5 \
55fftw \
56statistics \
57dynamic_link \
58console \
59arnoldi \
60spreadsheet \
61tclsci \
62commons \
63jvm \
64types \
65action_binding \
66graphic_objects \
67renderer \
68gui \
69graphic_export \
70graphics \
71optimization \
72randlib \
73interpolation \
74sound \
75overloading \
76m2sci \
77development_tools \
78helptools \
79umfpack \
80demo_tools \
81parameters \
82matio \
83atoms \
84hdf5 \
85graph \
86ast \
87scinotes \
88parallel \
89modules_manager \
90ui_data \
91history_browser \
92preferences \
93xml \
94external_objects \
95slint \
96coverage \
97webtools
98
99if GUI
100SUBDIRS += external_objects_java
101endif
102
103if XCOS
104SUBDIRS += scicos_blocks scicos xcos
105else
106SUBDIRS += xcos
107endif
108
109if MPI
110SUBDIRS += mpi
111endif
112
113SUBDIRS += .
114
115# javasci should be compile at the end because it needs libscilab.la
116# Don't forget that the order in subdirs does matter !!!
117if JAVASCI
118SUBDIRS += javasci
119endif
120
121#### Basic files ####
122libscilab_la_rootdir = $(mydatadir)
123
124# libscilab is the full library with the GUI
125# libscilab-cli is for scilab-cli (without GUI)
126pkglib_LTLIBRARIES = libscilab-cli.la libscilab.la
127libscilab_la_SOURCES =
128
129AM_CPPFLAGS = $(SCI_CPPFLAGS)
130AM_CFLAGS   = $(SCI_CFLAGS)
131AM_CXXFLAGS = $(SCI_CXXFLAGS)
132AM_FFLAGS   = $(SCI_FFLAGS)
133AM_LDFLAGS  = $(SCI_LDFLAGS)
134
135# Tag shared libraries with the Scilab version
136AM_LDFLAGS += -version-number $(SCILAB_LIBRARY_VERSION)
137
138GUI_LIBS = $(top_builddir)/modules/gui/libscigui.la \
139	$(top_builddir)/modules/renderer/libscirenderer.la \
140	$(top_builddir)/modules/graphics/libscigraphics.la \
141	$(top_builddir)/modules/graphic_export/libscigraphic_export.la \
142	$(top_builddir)/modules/console/libsciconsole.la \
143	$(top_builddir)/modules/action_binding/libsciaction_binding.la \
144	$(top_builddir)/modules/jvm/libscijvm.la \
145	$(top_builddir)/modules/graphic_objects/libscigraphic_objects.la \
146	$(top_builddir)/modules/scinotes/libsciscinotes.la \
147	$(top_builddir)/modules/ui_data/libsciui_data.la \
148	$(top_builddir)/modules/history_browser/libscihistory_browser.la \
149	$(top_builddir)/modules/commons/libscicommons.la \
150	$(top_builddir)/modules/types/libscitypes-java.la \
151	$(top_builddir)/modules/preferences/libscipreferences.la \
152	$(top_builddir)/modules/external_objects_java/libsciexternal_objects_java.la \
153	$(top_builddir)/modules/helptools/libscihelptools.la \
154	$(top_builddir)/modules/tclsci/libscitclsci.la
155
156if IS_MACOSX
157NO_GUI_LIBS =
158else
159NO_GUI_LIBS = $(top_builddir)/modules/gui/libscigui-disable.la \
160	$(top_builddir)/modules/graphics/libscigraphics-disable.la \
161	$(top_builddir)/modules/graphic_export/libscigraphic_export-disable.la \
162	$(top_builddir)/modules/console/libsciconsole-minimal.la \
163	$(top_builddir)/modules/action_binding/libsciaction_binding-disable.la \
164	$(top_builddir)/modules/jvm/libscijvm-disable.la \
165	$(top_builddir)/modules/xcos/libscixcos-disable.la \
166	$(top_builddir)/modules/graphic_objects/libscigraphic_objects-disable.la \
167	$(top_builddir)/modules/scinotes/libsciscinotes-disable.la \
168	$(top_builddir)/modules/ui_data/libsciui_data-disable.la \
169	$(top_builddir)/modules/history_browser/libscihistory_browser-disable.la \
170	$(top_builddir)/modules/commons/libscicommons-disable.la \
171	$(top_builddir)/modules/preferences/libscipreferences-cli.la \
172	$(top_builddir)/modules/tclsci/libscitclsci-disable.la
173endif
174
175ENGINE_LIBS =	$(top_builddir)/modules/fileio/libscifileio.la \
176	$(top_builddir)/modules/mexlib/libmex.la \
177	$(top_builddir)/modules/functions/libscifunctions.la \
178	$(top_builddir)/modules/parameters/libsciparameters.la \
179	$(top_builddir)/modules/boolean/libsciboolean.la \
180	$(top_builddir)/modules/cacsd/libscicacsd.la \
181	$(top_builddir)/modules/core/libscicore.la \
182	$(top_builddir)/modules/call_scilab/libscicall_scilab.la \
183	$(top_builddir)/modules/api_scilab/libsciapi_scilab.la \
184	$(top_builddir)/modules/data_structures/libscidata_structures.la \
185	$(top_builddir)/modules/differential_equations/libscidifferential_equations.la \
186	$(top_builddir)/modules/elementary_functions/libscielementary_functions.la \
187	$(top_builddir)/modules/integer/libsciinteger.la \
188	$(top_builddir)/modules/io/libsciio.la \
189	$(top_builddir)/modules/linear_algebra/libscilinear_algebra.la \
190	$(top_builddir)/modules/localization/libscilocalization.la \
191	$(top_builddir)/modules/polynomials/libscipolynomials.la \
192	$(top_builddir)/modules/special_functions/libscispecial_functions.la \
193	$(top_builddir)/modules/time/libscitime.la \
194	$(top_builddir)/modules/windows_tools/libsciwindows_tools.la \
195	$(top_builddir)/modules/sparse/libscisparse.la \
196	$(top_builddir)/modules/completion/libscicompletion.la \
197	$(top_builddir)/modules/history_manager/libscihistory_manager.la \
198	$(top_builddir)/modules/output_stream/libscioutput_stream.la \
199	$(top_builddir)/modules/string/libscistring.la \
200	$(top_builddir)/modules/hdf5/libscihdf5.la \
201	$(top_builddir)/modules/fftw/libscifftw.la \
202	$(top_builddir)/modules/statistics/libscistatistics.la \
203	$(top_builddir)/modules/dynamic_link/libscidynamic_link.la \
204	$(top_builddir)/modules/threads/libscithreads.la \
205	$(top_builddir)/modules/ast/libsciast.la \
206	$(top_builddir)/modules/functions_manager/libscifunctions_manager.la \
207	$(top_builddir)/modules/xml/libscixml.la \
208	$(top_builddir)/modules/external_objects/libsciexternal_objects.la \
209	$(top_builddir)/modules/slint/libscislint.la \
210	$(top_builddir)/modules/coverage/libscicoverage.la
211
212# These libraries are loaded dynamically from Scilab.
213ENGINE_LIBS_DYNAMIC_LOAD = \
214	$(top_builddir)/modules/optimization/libscioptimization.la \
215	$(top_builddir)/modules/signal_processing/libscisignal_processing.la \
216	$(top_builddir)/modules/interpolation/libsciinterpolation.la \
217	$(top_builddir)/modules/arnoldi/libsciarnoldi.la \
218	$(top_builddir)/modules/randlib/libscirandlib.la \
219	$(top_builddir)/modules/xcos/libscixcos.la \
220	$(top_builddir)/modules/scicos_blocks/libsciscicos_blocks.la \
221	$(top_builddir)/modules/scicos/libsciscicos.la \
222	$(top_builddir)/modules/sound/libscisound.la \
223	$(top_builddir)/modules/spreadsheet/libscispreadsheet.la \
224	$(top_builddir)/modules/umfpack/libsciumfpack.la \
225	$(top_builddir)/modules/matio/libscimatio.la \
226	$(top_builddir)/modules/parallel/libsciparallel.la \
227    $(top_builddir)/modules/webtools/libsciwebtools.la
228
229if MPI
230ENGINE_LIBS += $(top_builddir)/modules/mpi/libscimpi.la
231endif
232
233# Core modules
234
235libscilab_la_LIBADD =
236
237if GUI
238# Force the libscijvm to be linked first. Under Debian, this avoid some reordering issues during the link
239libscilab_la_LIBADD += $(top_builddir)/modules/jvm/libscijvm.la $(GUI_LIBS)
240else
241libscilab_la_LIBADD += $(NO_GUI_LIBS)
242endif
243
244libscilab_la_LIBADD += $(top_builddir)/modules/libscilab-cli.la
245
246# Core modules
247libscilab_la_LIBADD += $(OTHER_LIBS) $(EXTERNAL_LIBS)
248
249if FORCE_LINK
250# This should never be used in production. It forces the explicit link
251# between libscilab and some "on-the-fly" loaded libraries.
252# It has been added to make sure that the full link is correctly done
253# and all symbols resolved.
254libscilab_la_LIBADD += $(ENGINE_LIBS_DYNAMIC_LOAD)
255endif
256
257libscilab_la_LIBADD += $(FLIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
258
259################## libscilab-cli  ##################
260
261libscilab_cli_la_SOURCES =
262
263libscilab_cli_la_LDFLAGS = $(AM_LDFLAGS) $(SCI_LDFLAGS)
264
265# Core modules
266libscilab_cli_la_LIBADD = $(ENGINE_LIBS) $(NO_GUI_LIBS) $(OTHER_LIBS) $(EXTERNAL_LIBS) $(FLIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
267
268# Compiler specific support
269libscilab_cli_la_LIBADD += -lstdc++fs # needed before gcc 9 (Ubuntu 18.04)
270
271.NOTPARALLEL: libscilab-cli.la libscilab.la
272