Fix the library linking declaration
[scilab.git] / scilab / modules / scicos_blocks / 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 # This file must be used under the terms of the CeCILL.
5 # This source file is licensed as described in the file COPYING, which
6 # you should have received as part of this distribution.  The terms
7 # are also available at
8 # http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
9
10 #### Target ######
11 modulename=scicos_blocks
12
13 #### Source listing ######
14
15 # All the filename are important here.
16 # The filename must be the same as the function name
17 # since they are used by genblocks.sh to generate the blocks.h
18 SCICOS_BLOCKS_C_SOURCES = src/c/absblk.c \
19 src/c/absolute_value.c \
20 src/c/acos_blk.c \
21 src/c/acosh_blk.c \
22 src/c/andlog.c \
23 src/c/asin_blk.c \
24 src/c/asinh_blk.c \
25 src/c/assignment.c \
26 src/c/atan_blk.c \
27 src/c/atanh_blk.c \
28 src/c/automat.c \
29 src/c/backlash.c \
30 src/c/bidon.c \
31 src/c/bit_clear_16.c \
32 src/c/bit_clear_32.c \
33 src/c/bit_clear_8.c \
34 src/c/bit_set_16.c \
35 src/c/bit_set_32.c \
36 src/c/bit_set_8.c \
37 src/c/bounce_ball.c \
38 src/c/bouncexy.c \
39 src/c/canimxy3d.c \
40 src/c/canimxy.c \
41 src/c/cdummy.c \
42 src/c/cevscpe.c \
43 src/c/cfscope.c \
44 src/c/cmat3d.c \
45 src/c/cmatview.c \
46 src/c/cmscope.c \
47 src/c/constraint_c.c \
48 src/c/convert.c \
49 src/c/cos_blk.c \
50 src/c/cosblk.c \
51 src/c/cosh_blk.c \
52 src/c/counter.c \
53 src/c/cscope.c \
54 src/c/cscopxy3d.c \
55 src/c/cscopxy.c \
56 src/c/csslti4.c \
57 src/c/cstblk4.c \
58 src/c/cstblk4_m.c \
59 src/c/cumsum_c.c \
60 src/c/cumsum_m.c \
61 src/c/cumsum_r.c \
62 src/c/cumsumz_c.c \
63 src/c/cumsumz_m.c \
64 src/c/cumsumz_r.c \
65 src/c/curve_c.c \
66 src/c/dband.c \
67 src/c/deadband.c \
68 src/c/delay4.c \
69 src/c/delay4_i16.c \
70 src/c/delay4_i32.c \
71 src/c/delay4_i8.c \
72 src/c/delay4_ui16.c \
73 src/c/delay4_ui32.c \
74 src/c/delay4_ui8.c \
75 src/c/deriv.c \
76 src/c/diffblk_c.c \
77 src/c/dmmul1.c \
78 src/c/dmmul.c \
79 src/c/dollar4.c \
80 src/c/dollar4_m.c \
81 src/c/dsslti4.c \
82 src/c/edgetrig.c \
83 src/c/evaluate_expr.c \
84 src/c/evtdly4.c \
85 src/c/evtvardly.c \
86 src/c/expblk_m.c \
87 src/c/extdiag.c \
88 src/c/extdiagz.c \
89 src/c/extract_bit_16_LH.c \
90 src/c/extract_bit_16_LSB.c \
91 src/c/extract_bit_16_MSB0.c \
92 src/c/extract_bit_16_MSB1.c \
93 src/c/extract_bit_16_RB0.c \
94 src/c/extract_bit_16_RB1.c \
95 src/c/extract_bit_16_UH0.c \
96 src/c/extract_bit_16_UH1.c \
97 src/c/extract_bit_32_LH.c \
98 src/c/extract_bit_32_LSB.c \
99 src/c/extract_bit_32_MSB0.c \
100 src/c/extract_bit_32_MSB1.c \
101 src/c/extract_bit_32_RB0.c \
102 src/c/extract_bit_32_RB1.c \
103 src/c/extract_bit_32_UH0.c \
104 src/c/extract_bit_32_UH1.c \
105 src/c/extract_bit_8_LH.c \
106 src/c/extract_bit_8_LSB.c \
107 src/c/extract_bit_8_MSB0.c \
108 src/c/extract_bit_8_MSB1.c \
109 src/c/extract_bit_8_RB0.c \
110 src/c/extract_bit_8_RB1.c \
111 src/c/extract_bit_8_UH0.c \
112 src/c/extract_bit_8_UH1.c \
113 src/c/extract_bit_u16_MSB1.c \
114 src/c/extract_bit_u16_RB1.c \
115 src/c/extract_bit_u16_UH1.c \
116 src/c/extract_bit_u32_MSB1.c \
117 src/c/extract_bit_u32_RB1.c \
118 src/c/extract_bit_u32_UH1.c \
119 src/c/extract_bit_u8_MSB1.c \
120 src/c/extract_bit_u8_RB1.c \
121 src/c/extract_bit_u8_UH1.c \
122 src/c/extract.c \
123 src/c/extractor.c \
124 src/c/extractz.c \
125 src/c/exttril.c \
126 src/c/exttrilz.c \
127 src/c/exttriu.c \
128 src/c/exttriuz.c \
129 src/c/foriterator.c \
130 src/c/fromws_c.c \
131 src/c/gainblk.c \
132 src/c/gainblk_i16e.c \
133 src/c/gainblk_i16n.c \
134 src/c/gainblk_i16s.c \
135 src/c/gainblk_i32e.c \
136 src/c/gainblk_i32n.c \
137 src/c/gainblk_i32s.c \
138 src/c/gainblk_i8e.c \
139 src/c/gainblk_i8n.c \
140 src/c/gainblk_i8s.c \
141 src/c/gainblk_ui16e.c \
142 src/c/gainblk_ui16n.c \
143 src/c/gainblk_ui16s.c \
144 src/c/gainblk_ui32e.c \
145 src/c/gainblk_ui32n.c \
146 src/c/gainblk_ui32s.c \
147 src/c/gainblk_ui8e.c \
148 src/c/gainblk_ui8n.c \
149 src/c/gainblk_ui8s.c \
150 src/c/gain.c \
151 src/c/hystheresis.c \
152 src/c/integral_func.c \
153 src/c/integralz_func.c \
154 src/c/invblk4.c \
155 src/c/logicalop.c \
156 src/c/logicalop_i16.c \
157 src/c/logicalop_i32.c \
158 src/c/logicalop_i8.c \
159 src/c/logicalop_m.c \
160 src/c/logicalop_ui16.c \
161 src/c/logicalop_ui32.c \
162 src/c/logicalop_ui8.c \
163 src/c/logic.c \
164 src/c/lookup2d.c \
165 src/c/lookup_c.c \
166 src/c/mat_bksl.c \
167 src/c/matbyscal.c \
168 src/c/matbyscal_e.c \
169 src/c/matbyscal_s.c \
170 src/c/mat_cath.c \
171 src/c/mat_catv.c \
172 src/c/mat_det.c \
173 src/c/mat_diag.c \
174 src/c/mat_div.c \
175 src/c/mat_expm.c \
176 src/c/mathermit_m.c \
177 src/c/mat_inv.c \
178 src/c/mat_lu.c \
179 src/c/matmul2_e.c \
180 src/c/matmul2_m.c \
181 src/c/matmul2_s.c \
182 src/c/matmul_i16e.c \
183 src/c/matmul_i16n.c \
184 src/c/matmul_i16s.c \
185 src/c/matmul_i32e.c \
186 src/c/matmul_i32n.c \
187 src/c/matmul_i32s.c \
188 src/c/matmul_i8e.c \
189 src/c/matmul_i8n.c \
190 src/c/matmul_i8s.c \
191 src/c/matmul_m.c \
192 src/c/matmul_ui16e.c \
193 src/c/matmul_ui16n.c \
194 src/c/matmul_ui16s.c \
195 src/c/matmul_ui32e.c \
196 src/c/matmul_ui32n.c \
197 src/c/matmul_ui32s.c \
198 src/c/matmul_ui8e.c \
199 src/c/matmul_ui8n.c \
200 src/c/matmul_ui8s.c \
201 src/c/mat_pinv.c \
202 src/c/mat_reshape.c \
203 src/c/mat_sing.c \
204 src/c/mat_sqrt.c \
205 src/c/mat_sum.c \
206 src/c/mat_sumc.c \
207 src/c/mat_suml.c \
208 src/c/mat_svd.c \
209 src/c/mattran_m.c \
210 src/c/mat_vps.c \
211 src/c/mat_vpv.c \
212 src/c/matz_abs.c \
213 src/c/matz_absc.c \
214 src/c/matz_bksl.c \
215 src/c/matz_cath.c \
216 src/c/matz_catv.c \
217 src/c/matz_conj.c \
218 src/c/matz_det.c \
219 src/c/matz_diag.c \
220 src/c/matz_div.c \
221 src/c/matz_expm.c \
222 src/c/matz_inv.c \
223 src/c/matz_lu.c \
224 src/c/matzmul2_m.c \
225 src/c/matzmul_m.c \
226 src/c/matz_pinv.c \
227 src/c/matz_reim.c \
228 src/c/matz_reimc.c \
229 src/c/matz_reshape.c \
230 src/c/matz_sing.c \
231 src/c/matz_sqrt.c \
232 src/c/matz_sum.c \
233 src/c/matz_sumc.c \
234 src/c/matz_suml.c \
235 src/c/matz_svd.c \
236 src/c/matztran_m.c \
237 src/c/matz_vps.c \
238 src/c/matz_vpv.c \
239 src/c/m_frequ.c \
240 src/c/minmax.c \
241 src/c/modulo_count.c \
242 src/c/mswitch.c \
243 src/c/multiplex.c \
244 src/c/plusblk.c \
245 src/c/prod.c \
246 src/c/product.c \
247 src/c/ramp.c \
248 src/c/ratelimiter.c \
249 src/c/readau.c \
250 src/c/readc.c \
251 src/c/relational_op.c \
252 src/c/relationalop.c \
253 src/c/relational_op_i16.c \
254 src/c/relational_op_i32.c \
255 src/c/relational_op_i8.c \
256 src/c/relational_op_ui16.c \
257 src/c/relational_op_ui32.c \
258 src/c/relational_op_ui8.c \
259 src/c/relay.c \
260 src/c/ricc_m.c \
261 src/c/rndblk_m.c \
262 src/c/rndblkz_m.c \
263 src/c/root_coef.c \
264 src/c/rootz_coef.c \
265 src/c/samphold4.c \
266 src/c/samphold4_m.c \
267 src/c/satur.c \
268 src/c/scalar2vector.c \
269 src/c/scicosexit.c \
270 src/c/selector.c \
271 src/c/selector_m.c \
272 src/c/shift_16_LA.c \
273 src/c/shift_16_LC.c \
274 src/c/shift_16_RA.c \
275 src/c/shift_16_RC.c \
276 src/c/shift_32_LA.c \
277 src/c/shift_32_LC.c \
278 src/c/shift_32_RA.c \
279 src/c/shift_32_RC.c \
280 src/c/shift_8_LA.c \
281 src/c/shift_8_LC.c \
282 src/c/shift_8_RA.c \
283 src/c/shift_8_RC.c \
284 src/c/shift_u16_RA.c \
285 src/c/shift_u32_RA.c \
286 src/c/shift_u8_RA.c \
287 src/c/signum.c \
288 src/c/sin_blk.c \
289 src/c/sinh_blk.c \
290 src/c/step_func.c \
291 src/c/submat.c \
292 src/c/submatz.c \
293 src/c/sum.c \
294 src/c/summation.c \
295 src/c/summation_i16e.c \
296 src/c/summation_i16n.c \
297 src/c/summation_i16s.c \
298 src/c/summation_i32e.c \
299 src/c/summation_i32n.c \
300 src/c/summation_i32s.c \
301 src/c/summation_i8e.c \
302 src/c/summation_i8n.c \
303 src/c/summation_i8s.c \
304 src/c/summation_ui16e.c \
305 src/c/summation_ui16n.c \
306 src/c/summation_ui16s.c \
307 src/c/summation_ui32e.c \
308 src/c/summation_ui32n.c \
309 src/c/summation_ui32s.c \
310 src/c/summation_ui8e.c \
311 src/c/summation_ui8n.c \
312 src/c/summation_ui8s.c \
313 src/c/summation_z.c \
314 src/c/switch2.c \
315 src/c/switch2_m.c \
316 src/c/switchn.c \
317 src/c/tablex2d_c.c \
318 src/c/tan_blk.c \
319 src/c/tanh_blk.c \
320 src/c/tcslti4.c \
321 src/c/tcsltj4.c \
322 src/c/time_delay.c \
323 src/c/tows_c.c \
324 src/c/variable_delay.c \
325 src/c/whileiterator.c \
326 src/c/writeau.c \
327 src/c/writec.c \
328 src/c/zcross2.c
329
330 SCICOS_BLOCKS_CXX_SOURCES = \
331 src/cpp/affich2.cpp
332
333 NON_BLOCK_C_SOURCES = \
334 src/c/scicos_evalhermite.c \
335 src/c/scicos_indexfinder.c
336
337 NON_BLOCK_CXX_SOURCES = \
338 src/cpp/scoUtils.cpp
339
340 NON_BLOCK_JNI_SOURCES = \
341 src/cpp/HelpersJNI.cpp \
342 src/jni/AfficheBlock.cpp
343
344 NON_BLOCK_CLI_SOURCES = \
345 src/cpp/HelpersCLI.cpp
346
347 GIWS_WRAPPERS = \
348 src/jni/Blocks.giws.xml
349
350 SCICOS_BLOCKS_FORTRAN_SOURCES = \
351 src/fortran/csslti.f \
352 src/fortran/cstblk.f \
353 src/fortran/delay.f \
354 src/fortran/delayv.f \
355 src/fortran/demux.f \
356 src/fortran/diffblk.f \
357 src/fortran/dlradp.f \
358 src/fortran/dollar.f \
359 src/fortran/dsslti.f \
360 src/fortran/eselect.f \
361 src/fortran/evtdly.f \
362 src/fortran/expblk.f \
363 src/fortran/forblk.f \
364 src/fortran/fsv.f \
365 src/fortran/gensin.f \
366 src/fortran/gensqr.f \
367 src/fortran/hltblk.f \
368 src/fortran/ifthel.f \
369 src/fortran/integr.f \
370 src/fortran/intplt.f \
371 src/fortran/intpol.f \
372 src/fortran/intrp2.f \
373 src/fortran/intrpl.f \
374 src/fortran/invblk.f \
375 src/fortran/iocopy.f \
376 src/fortran/logblk.f \
377 src/fortran/lookup.f \
378 src/fortran/lsplit.f \
379 src/fortran/lusat.f \
380 src/fortran/maxblk.f \
381 src/fortran/memo.f \
382 src/fortran/mfclck.f \
383 src/fortran/minblk.f \
384 src/fortran/mux.f \
385 src/fortran/pload.f \
386 src/fortran/powblk.f \
387 src/fortran/qzcel.f \
388 src/fortran/qzflr.f \
389 src/fortran/qzrnd.f \
390 src/fortran/qztrn.f \
391 src/fortran/readf.f \
392 src/fortran/rndblk.f \
393 src/fortran/samphold.f \
394 src/fortran/sawtth.f \
395 src/fortran/sciblk.f \
396 src/fortran/selblk.f \
397 src/fortran/sinblk.f \
398 src/fortran/sqrblk.f \
399 src/fortran/sum2.f \
400 src/fortran/sum3.f \
401 src/fortran/tanblk.f \
402 src/fortran/tcslti.f \
403 src/fortran/tcsltj.f \
404 src/fortran/timblk.f \
405 src/fortran/trash.f \
406 src/fortran/writef.f \
407 src/fortran/zcross.f
408
409 #### Multi-libraries handling ######
410
411 noinst_LTLIBRARIES = libsciscicos_blocks-algo.la
412 pkglib_LTLIBRARIES = libsciscicos_blocks-cli.la
413 if XCOS
414 if GUI
415 pkglib_LTLIBRARIES += libsciscicos_blocks.la
416 endif
417 endif
418
419 libsciscicos_blocks_algo_la_LDFLAGS = $(AM_LDFLAGS)
420 libsciscicos_blocks_la_LDFLAGS = $(AM_LDFLAGS)
421 libsciscicos_blocks_cli_la_LDFLAGS = $(AM_LDFLAGS)
422
423 libsciscicos_blocks_algo_la_CPPFLAGS= -I$(srcdir)/includes/ \
424                         -I$(srcdir)/src/c/ \
425                         -I$(srcdir)/src/cpp/ \
426                         -I$(top_srcdir)/modules/api_scilab/includes/ \
427                         -I$(top_srcdir)/modules/elementary_functions/includes/ \
428                         -I$(top_srcdir)/modules/fileio/includes/ \
429                         -I$(top_srcdir)/modules/graphics/includes/ \
430                         -I$(top_srcdir)/modules/graphic_objects/includes/ \
431                         -I$(top_srcdir)/modules/localization/includes/ \
432                         -I$(top_srcdir)/modules/output_stream/includes/ \
433                         -I$(top_srcdir)/modules/renderer/includes/ \
434                         -I$(top_srcdir)/modules/scicos/includes/ \
435                         -I$(top_srcdir)/modules/string/includes/ \
436                         $(AM_CPPFLAGS)
437
438 libsciscicos_blocks_la_CPPFLAGS= -I$(srcdir)/src/jni/ \
439                         -I$(top_srcdir)/modules/commons/src/jni/ \
440                         -I$(top_srcdir)/modules/jvm/includes/ \
441                         $(JAVA_JNI_INCLUDE) \
442                         $(libsciscicos_blocks_algo_la_CPPFLAGS)
443
444 libsciscicos_blocks_cli_la_CPPFLAGS= $(libsciscicos_blocks_algo_la_CPPFLAGS)
445
446 libsciscicos_blocks_algo_la_SOURCES = $(SCICOS_BLOCKS_C_SOURCES) \
447 $(SCICOS_BLOCKS_CXX_SOURCES) \
448 $(SCICOS_BLOCKS_FORTRAN_SOURCES) \
449 $(NON_BLOCK_C_SOURCES) \
450 $(NON_BLOCK_CXX_SOURCES)
451
452 libsciscicos_blocks_cli_la_SOURCES =
453 libsciscicos_blocks_la_SOURCES =
454
455 libsciscicos_blocks_algo_la_LIBADD =
456 libsciscicos_blocks_la_LIBADD =
457 libsciscicos_blocks_cli_la_LIBADD =
458
459 if XCOS
460 libsciscicos_blocks_cli_la_SOURCES += $(NON_BLOCK_CLI_SOURCES)
461 libsciscicos_blocks_cli_la_LIBADD += libsciscicos_blocks-algo.la
462 if GUI
463 libsciscicos_blocks_la_SOURCES += $(NON_BLOCK_JNI_SOURCES)
464 libsciscicos_blocks_la_LIBADD += libsciscicos_blocks-algo.la
465 endif
466 endif
467
468 libsciscicos_blocks_algo_la_LIBADD += $(RT_LIB)
469 libsciscicos_blocks_la_LIBADD += $(RT_LIB)
470 libsciscicos_blocks_cli_la_LIBADD += $(RT_LIB)
471
472 # For the code check (splint)
473 CHECK_SRC= $(SCICOS_BLOCKS_C_SOURCES) $(NON_BLOCK_C_SOURCES)
474 INCLUDE_FLAGS = $(libsciscicos_blocks_la_CPPFLAGS)
475
476
477 #### scicos_blocks : Generation of the  includes/blocks.h Files ####
478 BUILT_SOURCES =
479
480 if XCOS
481 BUILT_SOURCES += includes/blocks.h
482 endif
483
484 if GIWS
485 BUILT_SOURCES += giws
486 endif
487
488 $(top_builddir)/modules/scicos_blocks/build/Cblocknames:Makefile.am $(SCICOS_BLOCKS_C_SOURCES)
489         @echo "-- Generates build/Cblocknames --"
490         @if test ! -d build; then mkdir $(top_builddir)/modules/scicos_blocks/build; fi
491 # Get the filename, strip the extension and put into a file
492         @for file in $(SCICOS_BLOCKS_C_SOURCES); do echo $$file |sed  's|.*/\([0-9A-Za-z_-]*\)\.c|\1|' ;done > $(top_builddir)/modules/scicos_blocks/build/Cblocknames
493
494 $(top_builddir)/modules/scicos_blocks/build/CPPblocknames:Makefile.am $(SCICOS_BLOCKS_CXX_SOURCES)
495         @echo "-- Generates build/CPPblocknames --"
496         @if test ! -d build; then mkdir $(top_builddir)/modules/scicos_blocks/build; fi
497 # Get the filename, strip the extension and put into a file
498         @for file in $(SCICOS_BLOCKS_CXX_SOURCES); do echo $$file |sed  's|.*/\([0-9A-Za-z_-]*\)\.cpp|\1|' ;done > $(top_builddir)/modules/scicos_blocks/build/CPPblocknames
499
500 $(top_builddir)/modules/scicos_blocks/build/Fblocknames: Makefile.am $(SCICOS_BLOCKS_FORTRAN_SOURCES)
501         @echo "-- Generates build/Fblocknames --"
502         @if test ! -d build; then mkdir $(top_builddir)/modules/scicos_blocks/build; fi
503 # Get the filename, strip the extension and put into a file
504         @for file in $(SCICOS_BLOCKS_FORTRAN_SOURCES); do echo $$file |sed  's|.*/\([0-9A-Za-z_-]*\)\.f|\1|';done > $(top_builddir)/modules/scicos_blocks/build/Fblocknames
505
506 includes/blocks.h: $(top_builddir)/modules/scicos_blocks/build/Cblocknames $(top_builddir)/modules/scicos_blocks/build/Fblocknames $(top_builddir)/modules/scicos_blocks/build/CPPblocknames
507         @echo "-- Building includes/blocks.h --"
508         @if test ! -d $(top_builddir)/modules/scicos_blocks/includes/; then \
509                 mkdir $(top_builddir)/modules/scicos_blocks/includes/; \
510         fi
511         @$(top_srcdir)/modules/scicos_blocks/src/scripts/GenBlocks.sh $(top_builddir)/modules/scicos_blocks/build/Fblocknames $(top_builddir)/modules/scicos_blocks/build/Cblocknames $(top_builddir)/modules/scicos_blocks/build/CPPblocknames $(top_builddir)/modules/scicos_blocks/includes/blocks.h
512
513 CLEANFILES=$(top_srcdir)/modules/scicos_blocks/includes/blocks.h \
514         $(top_srcdir)/modules/scicos_blocks/build/Cblocknames \
515         $(top_srcdir)/modules/scicos_blocks/build/Fblocknames \
516         $(top_srcdir)/modules/scicos_blocks/build/CPPblocknames \
517         $(srcdir)/macros/Electrical/*.moc \
518     $(srcdir)/macros/*/models \
519         $(srcdir)/macros/Hydraulics/*.moc \
520         $(BASE_PATH)/linenum.ml
521
522 #### scicos_blocks : Conf files ####
523 libsciscicos_blocks_la_rootdir = $(mydatadir)
524 libsciscicos_blocks_la_root_DATA =  license.txt
525
526 #### scicos_blocks : init scripts ####
527 libsciscicos_blocks_la_etcdir = $(mydatadir)/etc
528 libsciscicos_blocks_la_etc_DATA = etc/scicos_blocks.quit etc/scicos_blocks.start
529
530 #### scicos_blocks : include files ####
531 libsciscicos_blocks_la_includedir=$(pkgincludedir)
532 libsciscicos_blocks_la_include_HEADERS = includes/scicos_block.h \
533 includes/scicos_block4.h \
534 includes/blocks.h
535
536
537 #### scicos_blocks : MACROS ####
538 MACROSDIRSEXT= macros/Branching \
539 macros/Electrical \
540 macros/Events \
541 macros/Hydraulics \
542 macros/IntegerOp \
543 macros/Linear \
544 macros/MatrixOp \
545 macros/Misc \
546 macros/NonLinear \
547 macros/PDE \
548 macros/Sinks \
549 macros/Sources \
550 macros/Threshold
551
552 MACROSSPECIALEXT=*.mo \
553 *.moc
554
555 TESTS_DIREXT= tests/unit_tests/Linear
556
557 .NOTPARALLEL: build/Fblocknames build/Cblocknames
558
559 include $(top_srcdir)/Makefile.incl.am
560