]>
Commit | Line | Data |
---|---|---|
62c82025 | 1 | ## |
50985c20 | 2 | ## This file is part of the libsigrok project. |
62c82025 | 3 | ## |
c73d2ea4 | 4 | ## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com> |
d375b3c3 | 5 | ## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> |
62c82025 | 6 | ## |
a1bb33af UH |
7 | ## This program is free software: you can redistribute it and/or modify |
8 | ## it under the terms of the GNU General Public License as published by | |
9 | ## the Free Software Foundation, either version 3 of the License, or | |
10 | ## (at your option) any later version. | |
62c82025 | 11 | ## |
a1bb33af UH |
12 | ## This program is distributed in the hope that it will be useful, |
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ## GNU General Public License for more details. | |
62c82025 | 16 | ## |
a1bb33af UH |
17 | ## You should have received a copy of the GNU General Public License |
18 | ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
62c82025 | 19 | ## |
a1bb33af | 20 | |
ea1d5351 | 21 | ACLOCAL_AMFLAGS = -I m4 |
ba1c29dc | 22 | AM_LIBTOOLFLAGS = --silent |
bcc3694f | 23 | GNUMAKEFLAGS = --no-print-directory |
ba1c29dc | 24 | |
9448951d DE |
25 | # distutils/setuptools cause trouble on distcheck. Disable for now. |
26 | DISTCHECK_CONFIGURE_FLAGS = --disable-python | |
27 | ||
ba1c29dc | 28 | FIRMWARE_DIR = $(datadir)/sigrok-firmware |
826938d8 | 29 | |
9ac018d0 | 30 | local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I. |
1f61c22f | 31 | if BINDINGS_CXX |
4cf2f34f | 32 | local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx |
1f61c22f | 33 | endif |
655b116c DE |
34 | # Do not hard-code the firmware location on Windows. |
35 | if WIN32 | |
36 | global_defs = | |
37 | else | |
38 | global_defs = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"' | |
39 | endif | |
1f61c22f | 40 | # Ensure that local include directories are always searched first. |
655b116c | 41 | AM_CPPFLAGS = $(local_includes) $(global_defs) |
340f6e7a | 42 | |
65489c1a | 43 | # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the |
1f61c22f | 44 | # python bindings CFLAGS are a superset of the C++ bindings CFLAGS. |
65489c1a | 45 | AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS) |
0441038e | 46 | AM_CXXFLAGS = $(SR_WXXFLAGS) $(LIBSIGROKCXX_CFLAGS) |
1f61c22f | 47 | |
8a7b47cd | 48 | lib_LTLIBRARIES = libsigrok.la |
a1bb33af | 49 | |
67bd8055 | 50 | # Backend files |
a695d6c0 | 51 | libsigrok_la_SOURCES = \ |
155b680d BV |
52 | src/backend.c \ |
53 | src/device.c \ | |
54 | src/session.c \ | |
55 | src/session_file.c \ | |
56 | src/session_driver.c \ | |
155b680d BV |
57 | src/hwdriver.c \ |
58 | src/trigger.c \ | |
59 | src/soft-trigger.c \ | |
fb019a0e | 60 | src/analog.c \ |
24287ea9 | 61 | src/fallback.c \ |
bee24666 | 62 | src/resource.c \ |
155b680d BV |
63 | src/strutil.c \ |
64 | src/log.c \ | |
65 | src/version.c \ | |
66 | src/error.c \ | |
aea4e458 LPC |
67 | src/std.c \ |
68 | src/sw_limits.c | |
960a75e4 | 69 | |
155b680d BV |
70 | # Input modules |
71 | libsigrok_la_SOURCES += \ | |
155b680d | 72 | src/input/input.c \ |
b84cba4d | 73 | src/input/binary.c \ |
02e24c0c | 74 | src/input/chronovu_la8.c \ |
41d214f6 | 75 | src/input/csv.c \ |
e6b15cb5 | 76 | src/input/raw_analog.c \ |
6d2897e3 | 77 | src/input/trace32_ad.c \ |
7db06394 | 78 | src/input/vcd.c \ |
155b680d | 79 | src/input/wav.c |
67bd8055 | 80 | |
155b680d BV |
81 | # Output modules |
82 | libsigrok_la_SOURCES += \ | |
83 | src/output/output.c \ | |
84 | src/output/analog.c \ | |
85 | src/output/ascii.c \ | |
86 | src/output/bits.c \ | |
87 | src/output/binary.c \ | |
88 | src/output/csv.c \ | |
89 | src/output/chronovu_la8.c \ | |
afaa75b9 | 90 | src/output/wav.c \ |
155b680d BV |
91 | src/output/hex.c \ |
92 | src/output/ols.c \ | |
3250d8c7 | 93 | src/output/srzip.c \ |
155b680d | 94 | src/output/vcd.c |
67bd8055 | 95 | |
988357ca UH |
96 | # Transform modules |
97 | libsigrok_la_SOURCES += \ | |
39f1752e | 98 | src/transform/transform.c \ |
43caa466 | 99 | src/transform/nop.c \ |
d74d30bb UH |
100 | src/transform/scale.c \ |
101 | src/transform/invert.c | |
988357ca | 102 | |
155b680d | 103 | # SCPI support |
67bd8055 | 104 | libsigrok_la_SOURCES += \ |
0a9d05dc | 105 | src/scpi.h \ |
155b680d | 106 | src/scpi/scpi.c \ |
91ef511d | 107 | src/scpi/helpers.c \ |
155b680d | 108 | src/scpi/scpi_tcp.c |
67bd8055 UH |
109 | if NEED_RPC |
110 | libsigrok_la_SOURCES += \ | |
155b680d BV |
111 | src/scpi/scpi_vxi.c \ |
112 | src/scpi/vxi_clnt.c \ | |
113 | src/scpi/vxi_xdr.c \ | |
114 | src/scpi/vxi.h | |
67bd8055 UH |
115 | endif |
116 | if NEED_SERIAL | |
117 | libsigrok_la_SOURCES += \ | |
155b680d BV |
118 | src/serial.c \ |
119 | src/scpi/scpi_serial.c | |
67bd8055 UH |
120 | endif |
121 | if NEED_USB | |
122 | libsigrok_la_SOURCES += \ | |
155b680d BV |
123 | src/ezusb.c \ |
124 | src/usb.c \ | |
125 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
126 | endif |
127 | if NEED_VISA | |
128 | libsigrok_la_SOURCES += \ | |
155b680d | 129 | src/scpi/scpi_visa.c |
67bd8055 | 130 | endif |
bb2a4ed4 ML |
131 | if NEED_GPIB |
132 | libsigrok_la_SOURCES += \ | |
7343ad1e | 133 | src/scpi/scpi_libgpib.c |
bb2a4ed4 | 134 | endif |
67bd8055 | 135 | |
f54ebe0c | 136 | # Modbus support |
daa39012 AJ |
137 | libsigrok_la_SOURCES += \ |
138 | src/modbus/modbus.c | |
4c938fc2 AJ |
139 | if NEED_SERIAL |
140 | libsigrok_la_SOURCES += \ | |
141 | src/modbus/modbus_serial_rtu.c | |
142 | endif | |
daa39012 | 143 | |
155b680d BV |
144 | # Hardware (DMM chip parsers) |
145 | libsigrok_la_SOURCES += \ | |
146 | src/dmm/es519xx.c \ | |
147 | src/dmm/fs9721.c \ | |
148 | src/dmm/fs9922.c \ | |
149 | src/dmm/m2110.c \ | |
150 | src/dmm/metex14.c \ | |
a24c3f4a | 151 | src/dmm/rs9lcd.c \ |
626027df | 152 | src/dmm/bm25x.c \ |
f3cde309 | 153 | src/dmm/ut71x.c \ |
c36f78f7 | 154 | src/dmm/ut372.c \ |
eed3dec8 MG |
155 | src/dmm/vc870.c \ |
156 | src/dmm/dtm0660.c | |
67bd8055 | 157 | |
6bcb3ee8 | 158 | # Hardware (LCR chip parsers) |
d378f100 | 159 | if NEED_SERIAL |
6bcb3ee8 JH |
160 | libsigrok_la_SOURCES += \ |
161 | src/lcr/es51919.c | |
d378f100 | 162 | endif |
6bcb3ee8 | 163 | |
e5d953b5 UH |
164 | # Hardware (Scale protocol parsers) |
165 | libsigrok_la_SOURCES += \ | |
166 | src/scale/kern.c | |
167 | ||
67bd8055 | 168 | # Hardware drivers |
5d8b3913 | 169 | noinst_LTLIBRARIES = src/libdrivers.la |
dd5c48a6 | 170 | |
5d8b3913 AJ |
171 | src/libdrivers.o: src/libdrivers.la |
172 | $(AM_V_CCLD)$(LINK) src/libdrivers.la | |
173 | src/libdrivers.lo: src/libdrivers.o | |
174 | $(AM_V_GEN)echo "# Generated by libtool" > $@ | |
175 | $(AM_V_at)echo "pic_object='libdrivers.o'" >> $@ | |
176 | $(AM_V_at)echo "non_pic_object='libdrivers.o'" >> $@ | |
177 | ||
178 | src_libdrivers_la_SOURCES = src/drivers.c | |
dd5c48a6 | 179 | |
67bd8055 | 180 | if HW_AGILENT_DMM |
5d8b3913 | 181 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
182 | src/hardware/agilent-dmm/api.c \ |
183 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
184 | src/hardware/agilent-dmm/sched.c | |
67bd8055 | 185 | endif |
67bd8055 | 186 | if HW_APPA_55II |
5d8b3913 | 187 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
188 | src/hardware/appa-55ii/protocol.h \ |
189 | src/hardware/appa-55ii/protocol.c \ | |
190 | src/hardware/appa-55ii/api.c | |
67bd8055 | 191 | endif |
6e8d31d4 | 192 | if HW_ARACHNID_LABS_RE_LOAD_PRO |
5d8b3913 | 193 | src_libdrivers_la_SOURCES += \ |
6e8d31d4 UH |
194 | src/hardware/arachnid-labs-re-load-pro/protocol.h \ |
195 | src/hardware/arachnid-labs-re-load-pro/protocol.c \ | |
196 | src/hardware/arachnid-labs-re-load-pro/api.c | |
197 | endif | |
67bd8055 | 198 | if HW_ASIX_SIGMA |
5d8b3913 | 199 | src_libdrivers_la_SOURCES += \ |
3ba56876 | 200 | src/hardware/asix-sigma/protocol.h \ |
201 | src/hardware/asix-sigma/protocol.c \ | |
202 | src/hardware/asix-sigma/api.c | |
67bd8055 UH |
203 | endif |
204 | if HW_ATTEN_PPS3XXX | |
5d8b3913 | 205 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
206 | src/hardware/atten-pps3xxx/protocol.h \ |
207 | src/hardware/atten-pps3xxx/protocol.c \ | |
208 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 209 | endif |
dfaee1de | 210 | if HW_BAYLIBRE_ACME |
5d8b3913 | 211 | src_libdrivers_la_SOURCES += \ |
dfaee1de BG |
212 | src/hardware/baylibre-acme/protocol.h \ |
213 | src/hardware/baylibre-acme/protocol.c \ | |
289eebd7 BG |
214 | src/hardware/baylibre-acme/api.c \ |
215 | src/hardware/baylibre-acme/gpio.h \ | |
216 | src/hardware/baylibre-acme/gpio.c | |
dfaee1de | 217 | endif |
bb993797 | 218 | if HW_BEAGLELOGIC |
5d8b3913 | 219 | src_libdrivers_la_SOURCES += \ |
3db4b08b | 220 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
221 | src/hardware/beaglelogic/protocol.h \ |
222 | src/hardware/beaglelogic/protocol.c \ | |
223 | src/hardware/beaglelogic/api.c | |
bb993797 | 224 | endif |
67bd8055 | 225 | if HW_BRYMEN_BM86X |
5d8b3913 | 226 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
227 | src/hardware/brymen-bm86x/protocol.h \ |
228 | src/hardware/brymen-bm86x/protocol.c \ | |
229 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
230 | endif |
231 | if HW_BRYMEN_DMM | |
5d8b3913 | 232 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
233 | src/hardware/brymen-dmm/parser.c \ |
234 | src/hardware/brymen-dmm/protocol.h \ | |
235 | src/hardware/brymen-dmm/protocol.c \ | |
236 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
237 | endif |
238 | if HW_CEM_DT_885X | |
5d8b3913 | 239 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
240 | src/hardware/cem-dt-885x/protocol.h \ |
241 | src/hardware/cem-dt-885x/protocol.c \ | |
242 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
243 | endif |
244 | if HW_CENTER_3XX | |
5d8b3913 | 245 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
246 | src/hardware/center-3xx/protocol.h \ |
247 | src/hardware/center-3xx/protocol.c \ | |
248 | src/hardware/center-3xx/api.c | |
67bd8055 | 249 | endif |
7b356712 | 250 | if HW_CHRONOVU_LA |
5d8b3913 | 251 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
252 | src/hardware/chronovu-la/protocol.h \ |
253 | src/hardware/chronovu-la/protocol.c \ | |
254 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
255 | endif |
256 | if HW_COLEAD_SLM | |
5d8b3913 | 257 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
258 | src/hardware/colead-slm/protocol.h \ |
259 | src/hardware/colead-slm/protocol.c \ | |
260 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
261 | endif |
262 | if HW_CONRAD_DIGI_35_CPU | |
5d8b3913 | 263 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
264 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
265 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
266 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
267 | endif |
268 | if HW_DEMO | |
5d8b3913 | 269 | src_libdrivers_la_SOURCES += \ |
155b680d | 270 | src/hardware/demo/demo.c |
67bd8055 | 271 | endif |
b5089195 | 272 | if HW_DEREE_DE5000 |
5d8b3913 | 273 | src_libdrivers_la_SOURCES += \ |
b5089195 JH |
274 | src/hardware/deree-de5000/api.c |
275 | endif | |
67bd8055 | 276 | if HW_FLUKE_DMM |
5d8b3913 | 277 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
278 | src/hardware/fluke-dmm/fluke-dmm.h \ |
279 | src/hardware/fluke-dmm/fluke.c \ | |
280 | src/hardware/fluke-dmm/api.c | |
67bd8055 | 281 | endif |
f2273382 | 282 | if HW_FTDI_LA |
5d8b3913 | 283 | src_libdrivers_la_SOURCES += \ |
f2273382 UH |
284 | src/hardware/ftdi-la/protocol.h \ |
285 | src/hardware/ftdi-la/protocol.c \ | |
286 | src/hardware/ftdi-la/api.c | |
4f7fdcdd | 287 | endif |
67bd8055 | 288 | if HW_FX2LAFW |
5d8b3913 | 289 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
290 | src/hardware/fx2lafw/protocol.h \ |
291 | src/hardware/fx2lafw/protocol.c \ | |
a7d7f93c | 292 | src/hardware/fx2lafw/api.c \ |
b9d53092 BV |
293 | src/hardware/fx2lafw/dslogic.c \ |
294 | src/hardware/fx2lafw/dslogic.h | |
67bd8055 UH |
295 | endif |
296 | if HW_GMC_MH_1X_2X | |
5d8b3913 | 297 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
298 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
299 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
300 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 | 301 | endif |
7c198f96 | 302 | if HW_GWINSTEK_GDS_800 |
5d8b3913 | 303 | src_libdrivers_la_SOURCES += \ |
7c198f96 ML |
304 | src/hardware/gwinstek-gds-800/protocol.h \ |
305 | src/hardware/gwinstek-gds-800/protocol.c \ | |
306 | src/hardware/gwinstek-gds-800/api.c | |
307 | endif | |
67bd8055 | 308 | if HW_HAMEG_HMO |
5d8b3913 | 309 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
310 | src/hardware/hameg-hmo/protocol.h \ |
311 | src/hardware/hameg-hmo/protocol.c \ | |
312 | src/hardware/hameg-hmo/api.c | |
67bd8055 | 313 | endif |
6c6bc80a | 314 | if HW_HANTEK_6XXX |
5d8b3913 | 315 | src_libdrivers_la_SOURCES += \ |
6c6bc80a C |
316 | src/hardware/hantek-6xxx/protocol.h \ |
317 | src/hardware/hantek-6xxx/protocol.c \ | |
318 | src/hardware/hantek-6xxx/api.c | |
319 | endif | |
67bd8055 | 320 | if HW_HANTEK_DSO |
5d8b3913 | 321 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
322 | src/hardware/hantek-dso/dso.h \ |
323 | src/hardware/hantek-dso/dso.c \ | |
324 | src/hardware/hantek-dso/api.c | |
67bd8055 | 325 | endif |
00b2a092 | 326 | if HW_HP_3457A |
5d8b3913 | 327 | src_libdrivers_la_SOURCES += \ |
00b2a092 AG |
328 | src/hardware/hp-3457a/protocol.h \ |
329 | src/hardware/hp-3457a/protocol.c \ | |
330 | src/hardware/hp-3457a/api.c | |
331 | endif | |
05ac4a98 | 332 | if HW_HUNG_CHANG_DSO_2100 |
5d8b3913 | 333 | src_libdrivers_la_SOURCES += \ |
05ac4a98 DG |
334 | src/hardware/hung-chang-dso-2100/protocol.h \ |
335 | src/hardware/hung-chang-dso-2100/protocol.c \ | |
336 | src/hardware/hung-chang-dso-2100/api.c | |
337 | endif | |
67bd8055 | 338 | if HW_IKALOGIC_SCANALOGIC2 |
5d8b3913 | 339 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
340 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
341 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
342 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
343 | endif |
344 | if HW_IKALOGIC_SCANAPLUS | |
5d8b3913 | 345 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
346 | src/hardware/ikalogic-scanaplus/protocol.h \ |
347 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
348 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
349 | endif |
350 | if HW_KECHENG_KC_330B | |
5d8b3913 | 351 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
352 | src/hardware/kecheng-kc-330b/protocol.h \ |
353 | src/hardware/kecheng-kc-330b/protocol.c \ | |
354 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 | 355 | endif |
9380ec2f | 356 | if HW_KERN_SCALE |
5d8b3913 | 357 | src_libdrivers_la_SOURCES += \ |
9380ec2f UH |
358 | src/hardware/kern-scale/protocol.h \ |
359 | src/hardware/kern-scale/protocol.c \ | |
360 | src/hardware/kern-scale/api.c | |
361 | endif | |
16fc7ee2 | 362 | if HW_KORAD_KAXXXXP |
5d8b3913 | 363 | src_libdrivers_la_SOURCES += \ |
16fc7ee2 UH |
364 | src/hardware/korad-kaxxxxp/protocol.h \ |
365 | src/hardware/korad-kaxxxxp/protocol.c \ | |
366 | src/hardware/korad-kaxxxxp/api.c | |
e75ee7de | 367 | endif |
67bd8055 | 368 | if HW_LASCAR_EL_USB |
5d8b3913 | 369 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
370 | src/hardware/lascar-el-usb/protocol.h \ |
371 | src/hardware/lascar-el-usb/protocol.c \ | |
372 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 373 | endif |
c7b17bcb | 374 | if HW_LECROY_LOGICSTUDIO |
5d8b3913 | 375 | src_libdrivers_la_SOURCES += \ |
c7b17bcb TS |
376 | src/hardware/lecroy-logicstudio/protocol.h \ |
377 | src/hardware/lecroy-logicstudio/protocol.c \ | |
378 | src/hardware/lecroy-logicstudio/api.c | |
379 | endif | |
8f4e922f | 380 | if HW_MANSON_HCS_3XXX |
5d8b3913 | 381 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
382 | src/hardware/manson-hcs-3xxx/protocol.h \ |
383 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
384 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 385 | endif |
e1ccfb19 | 386 | if HW_MAYNUO_M97 |
5d8b3913 | 387 | src_libdrivers_la_SOURCES += \ |
e1ccfb19 AJ |
388 | src/hardware/maynuo-m97/protocol.h \ |
389 | src/hardware/maynuo-m97/protocol.c \ | |
390 | src/hardware/maynuo-m97/api.c | |
391 | endif | |
67bd8055 | 392 | if HW_MIC_985XX |
5d8b3913 | 393 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
394 | src/hardware/mic-985xx/protocol.h \ |
395 | src/hardware/mic-985xx/protocol.c \ | |
396 | src/hardware/mic-985xx/api.c | |
67bd8055 | 397 | endif |
41b7bd01 | 398 | if HW_MOTECH_LPS_30X |
5d8b3913 | 399 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
400 | src/hardware/motech-lps-30x/protocol.h \ |
401 | src/hardware/motech-lps-30x/protocol.c \ | |
402 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 403 | endif |
67bd8055 | 404 | if HW_NORMA_DMM |
5d8b3913 | 405 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
406 | src/hardware/norma-dmm/protocol.h \ |
407 | src/hardware/norma-dmm/protocol.c \ | |
408 | src/hardware/norma-dmm/api.c | |
67bd8055 | 409 | endif |
d4b38748 | 410 | if HW_OPENBENCH_LOGIC_SNIFFER |
5d8b3913 | 411 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
412 | src/hardware/openbench-logic-sniffer/protocol.h \ |
413 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
414 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 | 415 | endif |
5a2c71cc | 416 | if HW_PCE_322A |
5d8b3913 | 417 | src_libdrivers_la_SOURCES += \ |
5a2c71cc GH |
418 | src/hardware/pce-322a/protocol.h \ |
419 | src/hardware/pce-322a/protocol.c \ | |
420 | src/hardware/pce-322a/api.c | |
421 | endif | |
4bd80e12 | 422 | if HW_PIPISTRELLO_OLS |
5d8b3913 | 423 | src_libdrivers_la_SOURCES += \ |
4bd80e12 | 424 | src/hardware/pipistrello-ols/protocol.h \ |
425 | src/hardware/pipistrello-ols/protocol.c \ | |
426 | src/hardware/pipistrello-ols/api.c | |
427 | endif | |
67bd8055 | 428 | if HW_RIGOL_DS |
5d8b3913 | 429 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
430 | src/hardware/rigol-ds/protocol.h \ |
431 | src/hardware/rigol-ds/protocol.c \ | |
432 | src/hardware/rigol-ds/api.c | |
67bd8055 UH |
433 | endif |
434 | if HW_SALEAE_LOGIC16 | |
5d8b3913 | 435 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
436 | src/hardware/saleae-logic16/protocol.h \ |
437 | src/hardware/saleae-logic16/protocol.c \ | |
438 | src/hardware/saleae-logic16/api.c | |
67bd8055 | 439 | endif |
ca1a7cb5 | 440 | if HW_SCPI_PPS |
5d8b3913 | 441 | src_libdrivers_la_SOURCES += \ |
ca1a7cb5 BV |
442 | src/hardware/scpi-pps/protocol.h \ |
443 | src/hardware/scpi-pps/protocol.c \ | |
d4eabea8 | 444 | src/hardware/scpi-pps/profiles.c \ |
ca1a7cb5 BV |
445 | src/hardware/scpi-pps/api.c |
446 | endif | |
67bd8055 | 447 | if HW_SERIAL_DMM |
5d8b3913 | 448 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
449 | src/hardware/serial-dmm/protocol.h \ |
450 | src/hardware/serial-dmm/protocol.c \ | |
451 | src/hardware/serial-dmm/api.c | |
67bd8055 UH |
452 | endif |
453 | if HW_SYSCLK_LWLA | |
5d8b3913 | 454 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
455 | src/hardware/sysclk-lwla/lwla.h \ |
456 | src/hardware/sysclk-lwla/lwla.c \ | |
be64f90b DE |
457 | src/hardware/sysclk-lwla/lwla1016.c \ |
458 | src/hardware/sysclk-lwla/lwla1034.c \ | |
155b680d BV |
459 | src/hardware/sysclk-lwla/protocol.h \ |
460 | src/hardware/sysclk-lwla/protocol.c \ | |
461 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
462 | endif |
463 | if HW_TELEINFO | |
5d8b3913 | 464 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
465 | src/hardware/teleinfo/protocol.h \ |
466 | src/hardware/teleinfo/protocol.c \ | |
467 | src/hardware/teleinfo/api.c | |
67bd8055 | 468 | endif |
0acdd793 | 469 | if HW_TESTO |
5d8b3913 | 470 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
471 | src/hardware/testo/protocol.h \ |
472 | src/hardware/testo/protocol.c \ | |
473 | src/hardware/testo/api.c | |
0acdd793 | 474 | endif |
67bd8055 | 475 | if HW_TONDAJ_SL_814 |
5d8b3913 | 476 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
477 | src/hardware/tondaj-sl-814/protocol.h \ |
478 | src/hardware/tondaj-sl-814/protocol.c \ | |
479 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
480 | endif |
481 | if HW_UNI_T_DMM | |
5d8b3913 | 482 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
483 | src/hardware/uni-t-dmm/protocol.h \ |
484 | src/hardware/uni-t-dmm/protocol.c \ | |
485 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
486 | endif |
487 | if HW_UNI_T_UT32X | |
5d8b3913 | 488 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
489 | src/hardware/uni-t-ut32x/protocol.h \ |
490 | src/hardware/uni-t-ut32x/protocol.c \ | |
491 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
492 | endif |
493 | if HW_VICTOR_DMM | |
5d8b3913 | 494 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
495 | src/hardware/victor-dmm/protocol.h \ |
496 | src/hardware/victor-dmm/protocol.c \ | |
497 | src/hardware/victor-dmm/api.c | |
67bd8055 | 498 | endif |
10763937 | 499 | if HW_YOKOGAWA_DLM |
5d8b3913 | 500 | src_libdrivers_la_SOURCES += \ |
10763937 SA |
501 | src/hardware/yokogawa-dlm/protocol.h \ |
502 | src/hardware/yokogawa-dlm/protocol.c \ | |
503 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
504 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
505 | src/hardware/yokogawa-dlm/api.c | |
506 | endif | |
67bd8055 | 507 | if HW_ZEROPLUS_LOGIC_CUBE |
5d8b3913 | 508 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
509 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
510 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
511 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
512 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
513 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
514 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
515 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
516 | endif |
517 | ||
5d8b3913 | 518 | libsigrok_la_LIBADD = src/libdrivers.lo $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS) |
1f61c22f | 519 | libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
ff101fca | 520 | |
45c59c8b | 521 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
522 | library_include_HEADERS = \ |
523 | include/libsigrok/libsigrok.h \ | |
122322a9 DE |
524 | include/libsigrok/proto.h |
525 | nodist_library_include_HEADERS = \ | |
63d0fb75 | 526 | include/libsigrok/version.h |
155b680d | 527 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 528 | |
8a7b47cd UH |
529 | pkgconfigdir = $(libdir)/pkgconfig |
530 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 531 | |
67bd8055 UH |
532 | EXTRA_DIST = \ |
533 | Doxyfile \ | |
534 | HACKING \ | |
535 | README.devices \ | |
31ac7735 DE |
536 | bindings/cxx/ConfigKey_methods.cpp \ |
537 | bindings/cxx/ConfigKey_methods.hpp \ | |
538 | bindings/cxx/ConfigKey_methods.i \ | |
539 | bindings/cxx/Doxyfile \ | |
540 | bindings/cxx/QuantityFlag_methods.cpp \ | |
541 | bindings/cxx/QuantityFlag_methods.hpp \ | |
542 | bindings/cxx/enums.py \ | |
543 | bindings/python/Doxyfile \ | |
544 | bindings/python/setup.py \ | |
545 | bindings/python/sigrok/__init__.py \ | |
546 | bindings/python/sigrok/core/__init__.py \ | |
547 | bindings/python/sigrok/core/classes.i \ | |
c4a1015a | 548 | bindings/ruby/classes.i \ |
31ac7735 DE |
549 | bindings/java/Doxyfile \ |
550 | bindings/java/org/sigrok/core/classes/classes.i \ | |
551 | bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \ | |
552 | bindings/java/org/sigrok/core/interfaces/LogCallback.java \ | |
31ac7735 DE |
553 | bindings/swig/classes.i \ |
554 | bindings/swig/doc.py \ | |
0a9d05dc | 555 | bindings/swig/templates.i \ |
67bd8055 UH |
556 | contrib/gnuplot_chronovu_la8.gpi \ |
557 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
558 | contrib/gnuplot_usbeesx.gpi \ | |
559 | contrib/gnuplot_usbeedx8.gpi \ | |
560 | contrib/gnuplot_usbeedx16.gpi \ | |
561 | contrib/sigrok-logo-notext.png \ | |
562 | contrib/z60_libsigrok.rules | |
563 | ||
564 | if HAVE_CHECK | |
02a2bf68 | 565 | TESTS = tests/main |
67bd8055 | 566 | check_PROGRAMS = ${TESTS} |
65489c1a | 567 | endif |
67bd8055 | 568 | |
02a2bf68 | 569 | tests_main_SOURCES = \ |
6592c369 | 570 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
571 | tests/lib.c \ |
572 | tests/lib.h \ | |
02a2bf68 UH |
573 | tests/main.c \ |
574 | tests/core.c \ | |
575 | tests/input_all.c \ | |
576 | tests/input_binary.c \ | |
577 | tests/output_all.c \ | |
578 | tests/transform_all.c \ | |
579 | tests/session.c \ | |
580 | tests/strutil.c \ | |
581 | tests/version.c \ | |
582 | tests/driver_all.c \ | |
583 | tests/device.c \ | |
6b71bf1b UH |
584 | tests/trigger.c \ |
585 | tests/analog.c | |
02a2bf68 | 586 | |
65489c1a | 587 | tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) |
dd8b5f56 | 588 | |
580ed400 ML |
589 | BUILD_EXTRA = |
590 | INSTALL_EXTRA = | |
7252a09e | 591 | UNINSTALL_EXTRA = |
580ed400 ML |
592 | CLEAN_EXTRA = |
593 | ||
c23c8659 ML |
594 | if BINDINGS_CXX |
595 | ||
52ff4f6a | 596 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la |
c23c8659 | 597 | |
52ff4f6a | 598 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp |
c23c8659 | 599 | |
bc8ff24d | 600 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) |
1f61c22f | 601 | bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
fc8f82e9 | 602 | |
0959ed3d UH |
603 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx |
604 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
122322a9 DE |
605 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp |
606 | nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
161dc24d | 607 | bindings/cxx/include/libsigrokcxx/enums.hpp |
c23c8659 | 608 | |
52ff4f6a | 609 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc |
c23c8659 | 610 | |
3532ed01 | 611 | doxy/xml/index.xml: include/libsigrok/libsigrok.h |
7f82ec4d | 612 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null |
580ed400 | 613 | |
cf5b338e | 614 | bindings/swig/enums.i: bindings/cxx/enums.timestamp |
580ed400 | 615 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp |
161dc24d | 616 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp |
c23c8659 | 617 | |
b595a458 | 618 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ |
c23c8659 | 619 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
b595a458 | 620 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml |
f2a189f0 | 621 | $(AM_V_at)touch $@ |
c23c8659 | 622 | |
580ed400 | 623 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
cf5b338e | 624 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
c23c8659 | 625 | |
580ed400 | 626 | cxx-clean: |
3532ed01 | 627 | rm -rf doxy/ |
bd4fda24 | 628 | rm -rf bindings/cxx/doxy/ |
45ec8f77 | 629 | rm -f bindings/swig/enums.i |
580ed400 | 630 | rm -f bindings/cxx/enums.cpp |
161dc24d | 631 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp |
580ed400 | 632 | rm -f bindings/cxx/enums.timestamp |
c23c8659 | 633 | |
580ed400 ML |
634 | CLEAN_EXTRA += cxx-clean |
635 | ||
636 | endif | |
f7740954 | 637 | |
bd4fda24 ML |
638 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml |
639 | ||
161dc24d | 640 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ |
bd4fda24 | 641 | bindings/cxx/enums.timestamp |
33c84e81 | 642 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null |
bd4fda24 | 643 | |
8ebf1469 DE |
644 | # Macro definitions to be used by the SWIG parser. |
645 | swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS= | |
646 | ||
f7740954 ML |
647 | if BINDINGS_PYTHON |
648 | ||
d1785122 | 649 | PDIR = bindings/python |
df979d6d ML |
650 | PDOC_START = bindings/python/sigrok/core/doc_start.i |
651 | PDOC_END = bindings/python/sigrok/core/doc_end.i | |
bd4fda24 | 652 | |
0441038e | 653 | setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' CXXFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' LDADD='$(PYSIGROK_LIBS)' |
c05a0ba5 DE |
654 | setup_quiet = --quiet |
655 | setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet) | |
a9cb82ac | 656 | |
df979d6d | 657 | $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 658 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core |
df979d6d ML |
659 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@ |
660 | ||
661 | $(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
662 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core | |
663 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@ | |
d1785122 ML |
664 | |
665 | python-build: $(PDIR)/timestamp | |
666 | ||
fd31865e | 667 | $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \ |
36e3f6a9 ML |
668 | bindings/swig/classes.i bindings/swig/templates.i \ |
669 | bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \ | |
670 | $(library_include_HEADERS) \ | |
df979d6d | 671 | $(nodist_library_include_HEADERS) \ |
fd31865e ML |
672 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
673 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 674 | @ORDER@ bindings/cxx/libsigrokcxx.la |
a9cb82ac | 675 | $(AM_V_at)$(setup_py) clean --all 2>/dev/null |
8ebf1469 | 676 | $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py |
a9cb82ac | 677 | $(AM_V_at): >$@ |
f7740954 | 678 | |
a9cb82ac DE |
679 | python-install: |
680 | $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" | |
452986be DE |
681 | destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ |
682 | --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" | |
f7740954 | 683 | |
c26162ff | 684 | python-clean: |
a9cb82ac DE |
685 | -$(AM_V_at)rm -f $(PDIR)/timestamp |
686 | -$(AM_V_at)rm -fr $(PDIR)/doxy | |
c05a0ba5 | 687 | -$(AM_V_at)$(setup_py) clean --all 2>/dev/null |
6a8c1d68 ML |
688 | |
689 | python-doc: | |
a9cb82ac | 690 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null |
f7740954 ML |
691 | |
692 | BUILD_EXTRA += python-build | |
693 | INSTALL_EXTRA += python-install | |
694 | CLEAN_EXTRA += python-clean | |
695 | ||
696 | endif | |
697 | ||
27d44cf6 AJ |
698 | if BINDINGS_RUBY |
699 | ||
700 | RDIR = bindings/ruby | |
701 | RDOC = $(RDIR)/doc.i | |
702 | RWRAP = $(RDIR)/classes_wrap.cpp | |
703 | ROBJ = $(RWRAP:.cpp=.o) | |
e9227902 | 704 | REXT = $(RDIR)/sigrok.$(RUBY_DLEXT) |
27d44cf6 AJ |
705 | |
706 | $(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
17165513 | 707 | $(AM_V_at)test -d $(RDIR) || $(MKDIR_P) $(RDIR) |
27d44cf6 AJ |
708 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@ |
709 | ||
d8f96097 | 710 | $(RWRAP): $(srcdir)/$(RDIR)/classes.i $(RDOC) \ |
27d44cf6 AJ |
711 | bindings/swig/classes.i bindings/swig/templates.i \ |
712 | bindings/swig/enums.i | |
d8f96097 | 713 | $(AM_V_GEN)$(SWIG) -ruby -c++ -Ibindings -Ibindings/cxx/include -I$(RDIR) $(local_includes) $(swig_defs) -o $@ $(srcdir)/$(RDIR)/classes.i |
27d44cf6 AJ |
714 | |
715 | $(ROBJ): $(RWRAP) \ | |
716 | $(library_include_HEADERS) \ | |
717 | $(nodist_library_include_HEADERS) \ | |
718 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
719 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
d8f96097 | 720 | $(AM_V_CXX)$(CXX) $(RBSIGROK_CFLAGS) -I. -Iinclude -Ibindings/cxx/include $(local_includes) -fPIC -o $@ -c $(RWRAP) |
27d44cf6 AJ |
721 | |
722 | $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la | |
d8f96097 | 723 | $(AM_V_CXXLD)$(CXX) -shared -o $@ $(ROBJ) -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS) |
27d44cf6 AJ |
724 | |
725 | ruby-build: $(REXT) | |
726 | ||
727 | ruby-install: $(REXT) | |
e9227902 | 728 | $(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
d8f96097 | 729 | $(INSTALL) $(REXT) $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
27d44cf6 | 730 | |
c4a1015a MS |
731 | ruby-uninstall: |
732 | rm -f $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)/sigrok.$(RUBY_DLEXT) | |
733 | ||
27d44cf6 AJ |
734 | ruby-clean: |
735 | -$(AM_V_at)rm -fr $(RDIR)/doc | |
17165513 | 736 | -$(AM_V_at)rm -f $(REXT) $(ROBJ) $(RWRAP) $(RDOC) |
27d44cf6 AJ |
737 | |
738 | ruby-doc: $(RWRAP) | |
d8f96097 | 739 | $(AM_V_at)yard doc -o $(RDIR)/doc $(RWRAP) |
27d44cf6 AJ |
740 | |
741 | BUILD_EXTRA += ruby-build | |
742 | INSTALL_EXTRA += ruby-install | |
c4a1015a | 743 | UNINSTALL_EXTRA += ruby-uninstall |
27d44cf6 AJ |
744 | CLEAN_EXTRA += ruby-clean |
745 | ||
746 | endif | |
747 | ||
9fcf4d0b ML |
748 | if BINDINGS_JAVA |
749 | ||
750 | JDIR = bindings/java | |
90bd7656 ML |
751 | JPKG = org/sigrok/core |
752 | JCLS = $(JDIR)/$(JPKG)/classes | |
753 | JINT = $(JDIR)/$(JPKG)/interfaces | |
33c84e81 | 754 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java |
90bd7656 | 755 | JSWG = $(JCLS)/classes.i |
bd4fda24 | 756 | JDOC = $(JCLS)/doc.i |
90bd7656 | 757 | JCXX = $(JCLS)/classes_wrap.cxx |
9fcf4d0b ML |
758 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
759 | JJAR = $(JDIR)/sigrok-core.jar | |
760 | ||
a9cb82ac DE |
761 | java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB) |
762 | ||
9fcf4d0b ML |
763 | java-build: $(JJAR) $(JLIB) |
764 | ||
dbde3b65 | 765 | $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 766 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) |
dbde3b65 | 767 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@ |
bd4fda24 | 768 | |
36e3f6a9 ML |
769 | $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \ |
770 | bindings/swig/templates.i bindings/swig/enums.i \ | |
fd31865e ML |
771 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
772 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
a9cb82ac | 773 | -$(AM_V_at)rm -f $(java_cleanfiles) |
8ebf1469 | 774 | $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \ |
4c9208a7 | 775 | -java -package org.sigrok.core.classes \ |
dbde3b65 DE |
776 | -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ |
777 | -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) | |
9fcf4d0b | 778 | |
90bd7656 | 779 | $(JJAR): $(JCXX) |
1f61c22f | 780 | $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC) |
f2a189f0 | 781 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 782 | |
fd31865e ML |
783 | $(JLIB): $(JCXX) \ |
784 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) \ | |
785 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
786 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 787 | @ORDER@ bindings/cxx/libsigrokcxx.la |
1f61c22f | 788 | $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 | 789 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
1f61c22f | 790 | -lsigrokcxx $(LIBSIGROKCXX_LIBS) -o $(JLIB) |
9fcf4d0b ML |
791 | |
792 | java-install: | |
df705a7a | 793 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni |
8e0f9bf7 | 794 | $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni |
df705a7a | 795 | $(INSTALL) -d $(DESTDIR)$(datadir)/java |
8e0f9bf7 | 796 | $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java |
9fcf4d0b | 797 | |
7252a09e DE |
798 | java-uninstall: |
799 | -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar | |
800 | -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so | |
801 | ||
9fcf4d0b | 802 | java-clean: |
45ec8f77 | 803 | -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC) |
a9cb82ac | 804 | -$(AM_V_at)rm -fr $(JDIR)/doxy |
8a314e90 ML |
805 | |
806 | java-doc: | |
a9cb82ac | 807 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile |
9fcf4d0b ML |
808 | |
809 | BUILD_EXTRA += java-build | |
810 | INSTALL_EXTRA += java-install | |
7252a09e | 811 | UNINSTALL_EXTRA += java-uninstall |
9fcf4d0b ML |
812 | CLEAN_EXTRA += java-clean |
813 | ||
814 | endif | |
815 | ||
f7740954 ML |
816 | all-local: $(BUILD_EXTRA) |
817 | install-exec-local: $(INSTALL_EXTRA) | |
7252a09e | 818 | uninstall-local: $(UNINSTALL_EXTRA) |
d1785122 | 819 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 820 | |
37829c15 DE |
821 | .PHONY: dist-changelog |
822 | ||
823 | dist-hook: dist-changelog | |
824 | ||
825 | dist-changelog: | |
826 | $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \ | |
827 | cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \ | |
828 | elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \ | |
829 | mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ | |
830 | else \ | |
831 | rm -f .ChangeLog.tmp; exit 1; \ | |
832 | fi | |
0fc12d66 | 833 |