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