support subgradient descent for linear regression
[liba.git] / java / meson.build
blob48ccf0b2c30b9cd96bd8d6b27dbb8ed33738e752
1 if get_option('java') == ''
2     subdir_done()
3 endif
5 sources = [
6     'include/liba.h',
7     'include/liba_crc16.h',
8     'include/liba_crc32.h',
9     'include/liba_crc64.h',
10     'include/liba_crc8.h',
11     'include/liba_hpf.h',
12     'include/liba_lpf.h',
13     'include/liba_mf.h',
14     'include/liba_pid.h',
15     'include/liba_pid_fuzzy.h',
16     'include/liba_pid_neuro.h',
17     'include/liba_tf.h',
18     'include/liba_trajbell.h',
19     'include/liba_trajpoly3.h',
20     'include/liba_trajpoly5.h',
21     'include/liba_trajpoly7.h',
22     'include/liba_trajtrap.h',
23     'include/liba_version.h',
24     'src/a.c',
25     'src/a.h',
26     'src/crc16.c',
27     'src/crc32.c',
28     'src/crc64.c',
29     'src/crc8.c',
30     'src/hpf.c',
31     'src/lpf.c',
32     'src/mf.c',
33     'src/pid.c',
34     'src/pid_fuzzy.c',
35     'src/pid_neuro.c',
36     'src/tf.c',
37     'src/trajbell.c',
38     'src/trajpoly3.c',
39     'src/trajpoly5.c',
40     'src/trajpoly7.c',
41     'src/trajtrap.c',
42     'src/version.c',
45 java_home = get_option('java').replace('\\', '/')
46 res = run_command(python, '-c', '''import os, sys, glob
47 res = os.path.join('@0@', 'include', '*', 'jni_md.h')
48 sys.stdout.write(os.path.dirname(glob.glob(res)[0]))
49 '''.format(java_home), capture: true, check: true
51 if res.returncode() == 0
52     includedir = java_home / 'include'
53     include = [
54         a_include,
55         include_directories('include'),
56         include_directories(includedir),
57         include_directories(res.stdout()),
58     ]
59 else
60     subdir_done()
61 endif
63 shared_module(
64     'a', sources,
65     c_args: c_args,
66     cpp_args: c_args,
67     implicit_include_directories: false,
68     include_directories: include,
69     install: true,
70     install_dir: get_option('libdir') / 'jni',
71     link_with: a.get_static_lib(),
72     name_prefix: build_machine.system() != 'windows' ? 'lib' : '',
75 add_languages('java')
77 sources = [
78     'src/liba.java',
79     'src/liba/crc16.java',
80     'src/liba/crc32.java',
81     'src/liba/crc64.java',
82     'src/liba/crc8.java',
83     'src/liba/hpf.java',
84     'src/liba/lpf.java',
85     'src/liba/mf.java',
86     'src/liba/pid.java',
87     'src/liba/pid_fuzzy.java',
88     'src/liba/pid_neuro.java',
89     'src/liba/tf.java',
90     'src/liba/trajbell.java',
91     'src/liba/trajpoly3.java',
92     'src/liba/trajpoly5.java',
93     'src/liba/trajpoly7.java',
94     'src/liba/trajtrap.java',
95     'src/liba/version.java',
98 jar('liba', sources,
99     implicit_include_directories: false,
100     include_directories: include_directories('src'),
101     install: true,