8efca9875afb4453cba3aab55055443c2b025a90
[scilab.git] / scilab / modules / scicos / Makefile.am
1 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 # Copyright (C) 2008 - INRIA - Sylvestre Ledru <sylvestre.ledru@inria.fr>
3 #
4 # Copyright (C) 2012 - 2016 - Scilab Enterprises
5 #
6 # This file is hereby licensed under the terms of the GNU GPL v2.0,
7 # pursuant to article 5.3.4 of the CeCILL v.2.1.
8 # This file was originally licensed under the terms of the CeCILL v2.1,
9 # and continues to be available under such terms.
10 # For more information, see the COPYING file which you should have received
11 # along with this program.
12
13 #### Target ######
14 modulename=scicos
15 DISABLE_HELP_CLEAN=yes
16
17 #### Source listing ######
18
19 SCICOS_CXX_SOURCES = \
20 src/cpp/il_state.cpp \
21 src/cpp/il_sim.cpp \
22 src/cpp/var2vec.cpp \
23 src/cpp/vec2var.cpp \
24 src/cpp/XMIResource.cpp \
25 src/cpp/XMIResource_load.cpp \
26 src/cpp/XMIResource_save.cpp \
27 src/cpp/Controller.cpp \
28 src/cpp/controller_helpers.cpp \
29 src/cpp/LoggerView.cpp \
30 src/cpp/Model.cpp \
31 src/cpp/Model_getObjectProperties.cpp \
32 src/cpp/Model_setObjectProperties.cpp \
33 src/cpp/view_scilab/Adapters.cpp \
34 src/cpp/view_scilab/BlockAdapter.cpp \
35 src/cpp/view_scilab/CprAdapter.cpp \
36 src/cpp/view_scilab/DiagramAdapter.cpp \
37 src/cpp/view_scilab/GraphicsAdapter.cpp \
38 src/cpp/view_scilab/LinkAdapter.cpp \
39 src/cpp/view_scilab/ModelAdapter.cpp \
40 src/cpp/view_scilab/ParamsAdapter.cpp \
41 src/cpp/view_scilab/ScsAdapter.cpp \
42 src/cpp/view_scilab/StateAdapter.cpp \
43 src/cpp/view_scilab/TextAdapter.cpp \
44 src/cpp/sciblk2.cpp \
45 src/cpp/sciblk4.cpp \
46 src/cpp/createblklist.cpp \
47 src/cpp/extractblklist.cpp
48
49
50 SCICOS_C_SOURCES = \
51 src/c/tree.c \
52 src/c/scicos_malloc.c \
53 src/c/scicos_print.c \
54 src/c/import.c \
55 src/c/scicos.c \
56 src/c/scicos_free.c \
57 src/c/ezxml.c \
58 src/c/var2sci.c \
59 src/c/MlistGetFieldNumber.c \
60 src/c/lsodar.c \
61 src/c/ddaskr.c
62
63 SCICOS_FORTRAN_SOURCES = \
64 src/fortran/sctree.f \
65 src/fortran/ftree2.f \
66 src/fortran/ftree3.f \
67 src/fortran/ftree4.f \
68 src/fortran/scifunc.f
69
70 NO_SCICOS_C_SOURCES = src/c/noscicos/noscicos.c
71
72 GATEWAY_CXX_SOURCES = \
73 sci_gateway/cpp/sci_scicos_debug.cpp \
74 sci_gateway/cpp/sci_scicos_debug_count.cpp \
75 sci_gateway/cpp/sci_scicos_log.cpp \
76 sci_gateway/cpp/sci_buildouttb.cpp \
77 sci_gateway/cpp/sci_ctree2.cpp \
78 sci_gateway/cpp/sci_ctree3.cpp \
79 sci_gateway/cpp/sci_ctree4.cpp \
80 sci_gateway/cpp/sci_coserror.cpp \
81 sci_gateway/cpp/sci_curblock.cpp \
82 sci_gateway/cpp/sci_data2sig.cpp \
83 sci_gateway/cpp/sci_diffobjs.cpp \
84 sci_gateway/cpp/sci_duplicate.cpp \
85 sci_gateway/cpp/sci_end_scicosim.cpp \
86 sci_gateway/cpp/sci_getblocklabel.cpp \
87 sci_gateway/cpp/sci_getscicosvars.cpp \
88 sci_gateway/cpp/sci_phase_simulation.cpp \
89 sci_gateway/cpp/sci_pointer_xproperty.cpp \
90 sci_gateway/cpp/sci_scicos_new.cpp \
91 sci_gateway/cpp/sci_scicos_setfield.cpp \
92 sci_gateway/cpp/sci_scicos_time.cpp \
93 sci_gateway/cpp/sci_scicosim.cpp \
94 sci_gateway/cpp/sci_set_blockerror.cpp \
95 sci_gateway/cpp/sci_set_xproperty.cpp \
96 sci_gateway/cpp/sci_sig2data.cpp \
97 sci_gateway/cpp/sci_validvar.cpp \
98 sci_gateway/cpp/sci_var2vec.cpp \
99 sci_gateway/cpp/sci_vec2var.cpp \
100 sci_gateway/cpp/sci_callblk.cpp \
101 sci_gateway/cpp/sci_model2blk.cpp \
102 sci_gateway/cpp/sci_scicosDiagramToScilab.cpp
103
104 GATEWAY_C_SOURCES = \
105 sci_gateway/c/sci_ftree2.c \
106 sci_gateway/c/sci_ftree3.c \
107 sci_gateway/c/sci_ftree4.c \
108 sci_gateway/c/sci_loadScicos.c \
109 sci_gateway/c/sci_sctree.c
110
111 GATEWAY_FORTRAN_SOURCES = \
112 sci_gateway/fortran/sci_f_tree2.f \
113 sci_gateway/fortran/sci_f_tree3.f \
114 sci_gateway/fortran/sci_f_tree4.f
115
116 #### Multi-libraries handling ######
117
118 noinst_LTLIBRARIES = libsciscicos-algo.la
119 if XCOS
120 pkglib_LTLIBRARIES = libscisundials.la \
121                      libsciscicos-cli.la
122 if GUI
123 pkglib_LTLIBRARIES += libsciscicos.la
124 endif
125 endif
126
127 libsciscicos_algo_la_LDFLAGS = $(AM_LDFLAGS)
128 libsciscicos_cli_la_LDFLAGS = $(AM_LDFLAGS)
129 libsciscicos_la_LDFLAGS = $(AM_LDFLAGS)
130
131 if XCOS
132 libsciscicos_algo_la_CPPFLAGS= -I$(srcdir)/includes/ \
133                         -I$(srcdir)/src/c/ \
134                         -I$(srcdir)/src/cpp/ \
135                         -I$(srcdir)/src/scicos_sundials/include/ \
136                         -I$(srcdir)/src/scicos_sundials/include/sundials/ \
137                         -I$(srcdir)/src/scicos_sundials/src/ida/ \
138                         -I$(top_srcdir)/modules/output_stream/includes/ \
139                         -I$(top_srcdir)/modules/fileio/includes/ \
140                         -I$(top_srcdir)/modules/dynamic_link/includes/ \
141                         -I$(top_srcdir)/modules/string/includes/ \
142                         -I$(top_srcdir)/modules/localization/includes/ \
143                         -I$(top_srcdir)/modules/scicos_blocks/includes/ \
144                         -I$(top_srcdir)/modules/action_binding/includes/ \
145                         -I$(top_srcdir)/modules/time/includes/ \
146                         -I$(top_srcdir)/modules/api_scilab/includes/ \
147                         -I$(top_srcdir)/modules/ast/includes/ast/ \
148                         -I$(top_srcdir)/modules/ast/includes/exps/ \
149                         -I$(top_srcdir)/modules/ast/includes/symbol/ \
150                         -I$(top_srcdir)/modules/ast/includes/operations/ \
151                         -I$(top_srcdir)/modules/ast/includes/system_env/ \
152                         -I$(top_srcdir)/modules/ast/includes/types/ \
153                         -I$(top_srcdir)/modules/ast/includes/analysis/ \
154                         -I$(top_srcdir)/modules/threads/includes/ \
155                         -I$(top_srcdir)/modules/console/includes/ \
156                         -I$(top_srcdir)/modules/differential_equations/includes/ \
157                         $(XML_FLAGS) \
158                         $(AM_CPPFLAGS)
159 else
160 libsciscicos_algo_la_CPPFLAGS= -I$(top_srcdir)/modules/output_stream/includes/ \
161                         -I$(top_srcdir)/modules/api_scilab/includes/ \
162                         -I$(top_srcdir)/modules/scicos/includes/ \
163                         $(XML_FLAGS) \
164                         $(AM_CPPFLAGS)
165 endif
166 libsciscicos_cli_la_CPPFLAGS = $(libsciscicos_algo_la_CPPFLAGS)
167 libsciscicos_la_CPPFLAGS = $(libsciscicos_algo_la_CPPFLAGS)
168
169 if XCOS
170 libsciscicos_algo_la_SOURCES = $(SCICOS_CXX_SOURCES) $(SCICOS_C_SOURCES) $(SCICOS_FORTRAN_SOURCES)
171 libsciscicos_cli_la_SOURCES = $(GATEWAY_CXX_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES)
172 libsciscicos_la_SOURCES = $(GATEWAY_CXX_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES)
173 else
174 libsciscicos_algo_la_SOURCES = $(NO_SCICOS_C_SOURCES)
175 libsciscicos_cli_la_SOURCES =
176 libsciscicos_la_SOURCES =
177 endif
178
179 libsciscicos_algo_la_LIBADD =  \
180                 $(RT_LIB) \
181                 $(LIBXML_LIBS)
182 libsciscicos_cli_la_LIBADD = libsciscicos-algo.la $(FLIBS)
183 libsciscicos_la_LIBADD = libsciscicos-algo.la $(FLIBS)
184 if XCOS
185 libsciscicos_cli_la_LIBADD += libscisundials.la \
186     $(top_builddir)/modules/scicos_blocks/libsciscicos_blocks-cli.la
187 if GUI
188 libsciscicos_la_LIBADD += libscisundials.la \
189     $(top_builddir)/modules/scicos_blocks/libsciscicos_blocks.la
190 endif
191 endif
192
193 # For the code check (splint)
194 CHECK_SRC= $(SCICOS_C_SOURCES) $(GATEWAY_C_SOURCES)
195 INCLUDE_FLAGS = $(libsciscicos_la_CFLAGS)
196
197 #### scicos : Conf files ####
198 libsciscicos_la_rootdir = $(mydatadir)
199 libsciscicos_la_root_DATA =  license.txt
200
201
202 #### scicos : init scripts ####
203 libsciscicos_la_etcdir = $(mydatadir)/etc
204 libsciscicos_la_etc_DATA = etc/scicos.quit etc/scicos.start
205
206 #### scicos : tcl scripts ####
207 libsciscicos_la_tcldir = $(mydatadir)/tcl
208 libsciscicos_la_tcl_DATA = tcl/MIHM.tcl \
209 tcl/scicos.gif \
210 tcl/scicos2.gif
211
212 #### scicos : gateway declaration ####
213 libsciscicos_la_sci_gatewaydir = $(mydatadir)/sci_gateway
214 libsciscicos_la_sci_gateway_DATA = sci_gateway/scicos_gateway.xml
215
216
217 #### scicos : include files ####
218 libsciscicos_la_includedir=$(pkgincludedir)/
219 libsciscicos_la_include_HEADERS = includes/scicos.h \
220 includes/scicos-def.h \
221 includes/scicos_free.h \
222 includes/scicos_malloc.h \
223 includes/scicos_math.h \
224 includes/scicos_print.h \
225 includes/dynlib_scicos.h \
226 includes/import.h
227
228
229
230 #### scicos : cosf files ####
231 libsciscicos_la_cosfdir=$(mydatadir)
232 nobase_libsciscicos_la_cosf_DATA = palettes/Branching.cosf \
233 palettes/DemoBlocks.cosf \
234 palettes/Events.cosf \
235 palettes/Integer.cosf \
236 palettes/Linear.cosf \
237 palettes/Matrix.cosf \
238 palettes/Non_linear.cosf \
239 palettes/OldBlocks.cosf \
240 palettes/Others.cosf \
241 palettes/Sinks.cosf \
242 palettes/Sources.cosf \
243 palettes/Threshold.cosf
244
245 #### scicos : MACROS ####
246 MACROSDIRSEXT= macros/scicos_auto \
247 macros/scicos_scicos \
248 macros/scicos_utils
249
250
251 #### scicos : SUNDIALS STUFF ####
252 SUNDIALS_SOURCES = src/scicos_sundials/src/cvode/cvode.c \
253 src/scicos_sundials/src/cvode/cvode_dense.c \
254 src/scicos_sundials/src/cvode/cvode_direct.c \
255 src/scicos_sundials/src/cvode/cvode_io.c \
256 src/scicos_sundials/src/ida/ida.c \
257 src/scicos_sundials/src/ida/ida_dense.c \
258 src/scicos_sundials/src/ida/ida_direct.c \
259 src/scicos_sundials/src/ida/ida_ic.c \
260 src/scicos_sundials/src/ida/ida_io.c \
261 src/scicos_sundials/src/kinsol/kinsol.c \
262 src/scicos_sundials/src/kinsol/kinsol_dense.c \
263 src/scicos_sundials/src/kinsol/kinsol_direct.c \
264 src/scicos_sundials/src/kinsol/kinsol_io.c \
265 src/scicos_sundials/src/nvec_ser/nvector_serial.c \
266 src/scicos_sundials/src/sundials/sundials_dense.c \
267 src/scicos_sundials/src/sundials/sundials_direct.c \
268 src/scicos_sundials/src/sundials/sundials_math.c \
269 src/scicos_sundials/src/sundials/sundials_nvector.c \
270 src/scicos_sundials/src/sundials/sundials_extension.c
271
272 libscisundials_la_CFLAGS = -I$(top_srcdir)/modules/scicos/src/scicos_sundials/include \
273 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/include/cvode \
274 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/include/ida \
275 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/include/kinsol \
276 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/include/nvec_ser \
277 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/include/sundials \
278 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/src/cvode \
279 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/src/ida \
280 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/src/kinsol \
281 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/src/nvec_ser \
282 -I$(top_srcdir)/modules/scicos/src/scicos_sundials/src/sundials
283
284
285 libscisundials_la_SOURCES = $(SUNDIALS_SOURCES)
286
287 include $(top_srcdir)/Makefile.incl.am
288
289 # Build modelica stuff
290 include $(srcdir)/Makefile.modelica.am
291