]>
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 \ | |
4ba4d52a | 151 | src/dmm/asycii.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 += \ |
6cf1a87b UH |
183 | src/hardware/agilent-dmm/protocol.h \ |
184 | src/hardware/agilent-dmm/protocol.c \ | |
185 | src/hardware/agilent-dmm/api.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 += \ |
ba508e22 UH |
271 | src/hardware/demo/protocol.h \ |
272 | src/hardware/demo/protocol.c \ | |
273 | src/hardware/demo/api.c | |
67bd8055 UH |
274 | endif |
275 | if HW_FLUKE_DMM | |
5d8b3913 | 276 | src_libdrivers_la_SOURCES += \ |
2cb232a9 UH |
277 | src/hardware/fluke-dmm/protocol.h \ |
278 | src/hardware/fluke-dmm/protocol.c \ | |
155b680d | 279 | src/hardware/fluke-dmm/api.c |
67bd8055 | 280 | endif |
f2273382 | 281 | if HW_FTDI_LA |
5d8b3913 | 282 | src_libdrivers_la_SOURCES += \ |
f2273382 UH |
283 | src/hardware/ftdi-la/protocol.h \ |
284 | src/hardware/ftdi-la/protocol.c \ | |
285 | src/hardware/ftdi-la/api.c | |
4f7fdcdd | 286 | endif |
67bd8055 | 287 | if HW_FX2LAFW |
5d8b3913 | 288 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
289 | src/hardware/fx2lafw/protocol.h \ |
290 | src/hardware/fx2lafw/protocol.c \ | |
a7d7f93c | 291 | src/hardware/fx2lafw/api.c \ |
b9d53092 BV |
292 | src/hardware/fx2lafw/dslogic.c \ |
293 | src/hardware/fx2lafw/dslogic.h | |
67bd8055 UH |
294 | endif |
295 | if HW_GMC_MH_1X_2X | |
5d8b3913 | 296 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
297 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
298 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
299 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 | 300 | endif |
7c198f96 | 301 | if HW_GWINSTEK_GDS_800 |
5d8b3913 | 302 | src_libdrivers_la_SOURCES += \ |
7c198f96 ML |
303 | src/hardware/gwinstek-gds-800/protocol.h \ |
304 | src/hardware/gwinstek-gds-800/protocol.c \ | |
305 | src/hardware/gwinstek-gds-800/api.c | |
306 | endif | |
67bd8055 | 307 | if HW_HAMEG_HMO |
5d8b3913 | 308 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
309 | src/hardware/hameg-hmo/protocol.h \ |
310 | src/hardware/hameg-hmo/protocol.c \ | |
311 | src/hardware/hameg-hmo/api.c | |
67bd8055 | 312 | endif |
6c6bc80a | 313 | if HW_HANTEK_6XXX |
5d8b3913 | 314 | src_libdrivers_la_SOURCES += \ |
6c6bc80a C |
315 | src/hardware/hantek-6xxx/protocol.h \ |
316 | src/hardware/hantek-6xxx/protocol.c \ | |
317 | src/hardware/hantek-6xxx/api.c | |
318 | endif | |
67bd8055 | 319 | if HW_HANTEK_DSO |
5d8b3913 | 320 | src_libdrivers_la_SOURCES += \ |
caeb8d7a UH |
321 | src/hardware/hantek-dso/protocol.h \ |
322 | src/hardware/hantek-dso/protocol.c \ | |
155b680d | 323 | src/hardware/hantek-dso/api.c |
67bd8055 | 324 | endif |
00b2a092 | 325 | if HW_HP_3457A |
5d8b3913 | 326 | src_libdrivers_la_SOURCES += \ |
00b2a092 AG |
327 | src/hardware/hp-3457a/protocol.h \ |
328 | src/hardware/hp-3457a/protocol.c \ | |
329 | src/hardware/hp-3457a/api.c | |
330 | endif | |
05ac4a98 | 331 | if HW_HUNG_CHANG_DSO_2100 |
5d8b3913 | 332 | src_libdrivers_la_SOURCES += \ |
05ac4a98 DG |
333 | src/hardware/hung-chang-dso-2100/protocol.h \ |
334 | src/hardware/hung-chang-dso-2100/protocol.c \ | |
335 | src/hardware/hung-chang-dso-2100/api.c | |
336 | endif | |
67bd8055 | 337 | if HW_IKALOGIC_SCANALOGIC2 |
5d8b3913 | 338 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
339 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
340 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
341 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
342 | endif |
343 | if HW_IKALOGIC_SCANAPLUS | |
5d8b3913 | 344 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
345 | src/hardware/ikalogic-scanaplus/protocol.h \ |
346 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
347 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
348 | endif |
349 | if HW_KECHENG_KC_330B | |
5d8b3913 | 350 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
351 | src/hardware/kecheng-kc-330b/protocol.h \ |
352 | src/hardware/kecheng-kc-330b/protocol.c \ | |
353 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 | 354 | endif |
9380ec2f | 355 | if HW_KERN_SCALE |
5d8b3913 | 356 | src_libdrivers_la_SOURCES += \ |
9380ec2f UH |
357 | src/hardware/kern-scale/protocol.h \ |
358 | src/hardware/kern-scale/protocol.c \ | |
359 | src/hardware/kern-scale/api.c | |
360 | endif | |
16fc7ee2 | 361 | if HW_KORAD_KAXXXXP |
5d8b3913 | 362 | src_libdrivers_la_SOURCES += \ |
16fc7ee2 UH |
363 | src/hardware/korad-kaxxxxp/protocol.h \ |
364 | src/hardware/korad-kaxxxxp/protocol.c \ | |
365 | src/hardware/korad-kaxxxxp/api.c | |
e75ee7de | 366 | endif |
67bd8055 | 367 | if HW_LASCAR_EL_USB |
5d8b3913 | 368 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
369 | src/hardware/lascar-el-usb/protocol.h \ |
370 | src/hardware/lascar-el-usb/protocol.c \ | |
371 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 372 | endif |
c7b17bcb | 373 | if HW_LECROY_LOGICSTUDIO |
5d8b3913 | 374 | src_libdrivers_la_SOURCES += \ |
c7b17bcb TS |
375 | src/hardware/lecroy-logicstudio/protocol.h \ |
376 | src/hardware/lecroy-logicstudio/protocol.c \ | |
377 | src/hardware/lecroy-logicstudio/api.c | |
378 | endif | |
e3b83c5e SS |
379 | if HW_LECROY_XSTREAM |
380 | src_libdrivers_la_SOURCES += \ | |
381 | src/hardware/lecroy-xstream/protocol.h \ | |
382 | src/hardware/lecroy-xstream/protocol.c \ | |
383 | src/hardware/lecroy-xstream/api.c | |
384 | endif | |
8f4e922f | 385 | if HW_MANSON_HCS_3XXX |
5d8b3913 | 386 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
387 | src/hardware/manson-hcs-3xxx/protocol.h \ |
388 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
389 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 390 | endif |
e1ccfb19 | 391 | if HW_MAYNUO_M97 |
5d8b3913 | 392 | src_libdrivers_la_SOURCES += \ |
e1ccfb19 AJ |
393 | src/hardware/maynuo-m97/protocol.h \ |
394 | src/hardware/maynuo-m97/protocol.c \ | |
395 | src/hardware/maynuo-m97/api.c | |
396 | endif | |
67bd8055 | 397 | if HW_MIC_985XX |
5d8b3913 | 398 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
399 | src/hardware/mic-985xx/protocol.h \ |
400 | src/hardware/mic-985xx/protocol.c \ | |
401 | src/hardware/mic-985xx/api.c | |
67bd8055 | 402 | endif |
41b7bd01 | 403 | if HW_MOTECH_LPS_30X |
5d8b3913 | 404 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
405 | src/hardware/motech-lps-30x/protocol.h \ |
406 | src/hardware/motech-lps-30x/protocol.c \ | |
407 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 408 | endif |
67bd8055 | 409 | if HW_NORMA_DMM |
5d8b3913 | 410 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
411 | src/hardware/norma-dmm/protocol.h \ |
412 | src/hardware/norma-dmm/protocol.c \ | |
413 | src/hardware/norma-dmm/api.c | |
67bd8055 | 414 | endif |
d4b38748 | 415 | if HW_OPENBENCH_LOGIC_SNIFFER |
5d8b3913 | 416 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
417 | src/hardware/openbench-logic-sniffer/protocol.h \ |
418 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
419 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 | 420 | endif |
5a2c71cc | 421 | if HW_PCE_322A |
5d8b3913 | 422 | src_libdrivers_la_SOURCES += \ |
5a2c71cc GH |
423 | src/hardware/pce-322a/protocol.h \ |
424 | src/hardware/pce-322a/protocol.c \ | |
425 | src/hardware/pce-322a/api.c | |
426 | endif | |
4bd80e12 | 427 | if HW_PIPISTRELLO_OLS |
5d8b3913 | 428 | src_libdrivers_la_SOURCES += \ |
4bd80e12 | 429 | src/hardware/pipistrello-ols/protocol.h \ |
430 | src/hardware/pipistrello-ols/protocol.c \ | |
431 | src/hardware/pipistrello-ols/api.c | |
432 | endif | |
67bd8055 | 433 | if HW_RIGOL_DS |
5d8b3913 | 434 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
435 | src/hardware/rigol-ds/protocol.h \ |
436 | src/hardware/rigol-ds/protocol.c \ | |
437 | src/hardware/rigol-ds/api.c | |
67bd8055 | 438 | endif |
a28b3df1 VI |
439 | if HW_ROHDE_SCHWARZ_SME_0X |
440 | src_libdrivers_la_SOURCES += \ | |
441 | src/hardware/rohde-schwarz-sme-0x/protocol.h \ | |
442 | src/hardware/rohde-schwarz-sme-0x/protocol.c \ | |
443 | src/hardware/rohde-schwarz-sme-0x/api.c | |
444 | endif | |
67bd8055 | 445 | if HW_SALEAE_LOGIC16 |
5d8b3913 | 446 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
447 | src/hardware/saleae-logic16/protocol.h \ |
448 | src/hardware/saleae-logic16/protocol.c \ | |
449 | src/hardware/saleae-logic16/api.c | |
67bd8055 | 450 | endif |
ca1a7cb5 | 451 | if HW_SCPI_PPS |
5d8b3913 | 452 | src_libdrivers_la_SOURCES += \ |
ca1a7cb5 BV |
453 | src/hardware/scpi-pps/protocol.h \ |
454 | src/hardware/scpi-pps/protocol.c \ | |
d4eabea8 | 455 | src/hardware/scpi-pps/profiles.c \ |
ca1a7cb5 BV |
456 | src/hardware/scpi-pps/api.c |
457 | endif | |
67bd8055 | 458 | if HW_SERIAL_DMM |
5d8b3913 | 459 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
460 | src/hardware/serial-dmm/protocol.h \ |
461 | src/hardware/serial-dmm/protocol.c \ | |
462 | src/hardware/serial-dmm/api.c | |
67bd8055 | 463 | endif |
503220ec GS |
464 | if HW_SERIAL_LCR |
465 | src_libdrivers_la_SOURCES += \ | |
466 | src/hardware/serial-lcr/api.c | |
467 | endif | |
67bd8055 | 468 | if HW_SYSCLK_LWLA |
5d8b3913 | 469 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
470 | src/hardware/sysclk-lwla/lwla.h \ |
471 | src/hardware/sysclk-lwla/lwla.c \ | |
be64f90b DE |
472 | src/hardware/sysclk-lwla/lwla1016.c \ |
473 | src/hardware/sysclk-lwla/lwla1034.c \ | |
155b680d BV |
474 | src/hardware/sysclk-lwla/protocol.h \ |
475 | src/hardware/sysclk-lwla/protocol.c \ | |
476 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
477 | endif |
478 | if HW_TELEINFO | |
5d8b3913 | 479 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
480 | src/hardware/teleinfo/protocol.h \ |
481 | src/hardware/teleinfo/protocol.c \ | |
482 | src/hardware/teleinfo/api.c | |
67bd8055 | 483 | endif |
0acdd793 | 484 | if HW_TESTO |
5d8b3913 | 485 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
486 | src/hardware/testo/protocol.h \ |
487 | src/hardware/testo/protocol.c \ | |
488 | src/hardware/testo/api.c | |
0acdd793 | 489 | endif |
67bd8055 | 490 | if HW_TONDAJ_SL_814 |
5d8b3913 | 491 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
492 | src/hardware/tondaj-sl-814/protocol.h \ |
493 | src/hardware/tondaj-sl-814/protocol.c \ | |
494 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
495 | endif |
496 | if HW_UNI_T_DMM | |
5d8b3913 | 497 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
498 | src/hardware/uni-t-dmm/protocol.h \ |
499 | src/hardware/uni-t-dmm/protocol.c \ | |
500 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
501 | endif |
502 | if HW_UNI_T_UT32X | |
5d8b3913 | 503 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
504 | src/hardware/uni-t-ut32x/protocol.h \ |
505 | src/hardware/uni-t-ut32x/protocol.c \ | |
506 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
507 | endif |
508 | if HW_VICTOR_DMM | |
5d8b3913 | 509 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
510 | src/hardware/victor-dmm/protocol.h \ |
511 | src/hardware/victor-dmm/protocol.c \ | |
512 | src/hardware/victor-dmm/api.c | |
67bd8055 | 513 | endif |
10763937 | 514 | if HW_YOKOGAWA_DLM |
5d8b3913 | 515 | src_libdrivers_la_SOURCES += \ |
10763937 SA |
516 | src/hardware/yokogawa-dlm/protocol.h \ |
517 | src/hardware/yokogawa-dlm/protocol.c \ | |
518 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
519 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
520 | src/hardware/yokogawa-dlm/api.c | |
521 | endif | |
67bd8055 | 522 | if HW_ZEROPLUS_LOGIC_CUBE |
5d8b3913 | 523 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
524 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
525 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
526 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
527 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
528 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
529 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
530 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
531 | endif |
532 | ||
5d8b3913 | 533 | libsigrok_la_LIBADD = src/libdrivers.lo $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS) |
1f61c22f | 534 | libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
ff101fca | 535 | |
45c59c8b | 536 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
537 | library_include_HEADERS = \ |
538 | include/libsigrok/libsigrok.h \ | |
122322a9 DE |
539 | include/libsigrok/proto.h |
540 | nodist_library_include_HEADERS = \ | |
63d0fb75 | 541 | include/libsigrok/version.h |
155b680d | 542 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 543 | |
8a7b47cd UH |
544 | pkgconfigdir = $(libdir)/pkgconfig |
545 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 546 | |
67bd8055 UH |
547 | EXTRA_DIST = \ |
548 | Doxyfile \ | |
549 | HACKING \ | |
550 | README.devices \ | |
31ac7735 DE |
551 | bindings/cxx/ConfigKey_methods.cpp \ |
552 | bindings/cxx/ConfigKey_methods.hpp \ | |
553 | bindings/cxx/ConfigKey_methods.i \ | |
554 | bindings/cxx/Doxyfile \ | |
555 | bindings/cxx/QuantityFlag_methods.cpp \ | |
556 | bindings/cxx/QuantityFlag_methods.hpp \ | |
557 | bindings/cxx/enums.py \ | |
558 | bindings/python/Doxyfile \ | |
559 | bindings/python/setup.py \ | |
560 | bindings/python/sigrok/__init__.py \ | |
561 | bindings/python/sigrok/core/__init__.py \ | |
562 | bindings/python/sigrok/core/classes.i \ | |
c4a1015a | 563 | bindings/ruby/classes.i \ |
31ac7735 DE |
564 | bindings/java/Doxyfile \ |
565 | bindings/java/org/sigrok/core/classes/classes.i \ | |
566 | bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \ | |
567 | bindings/java/org/sigrok/core/interfaces/LogCallback.java \ | |
31ac7735 DE |
568 | bindings/swig/classes.i \ |
569 | bindings/swig/doc.py \ | |
0a9d05dc | 570 | bindings/swig/templates.i \ |
67bd8055 UH |
571 | contrib/sigrok-logo-notext.png \ |
572 | contrib/z60_libsigrok.rules | |
573 | ||
574 | if HAVE_CHECK | |
02a2bf68 | 575 | TESTS = tests/main |
67bd8055 | 576 | check_PROGRAMS = ${TESTS} |
65489c1a | 577 | endif |
67bd8055 | 578 | |
02a2bf68 | 579 | tests_main_SOURCES = \ |
6592c369 | 580 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
581 | tests/lib.c \ |
582 | tests/lib.h \ | |
02a2bf68 UH |
583 | tests/main.c \ |
584 | tests/core.c \ | |
585 | tests/input_all.c \ | |
586 | tests/input_binary.c \ | |
587 | tests/output_all.c \ | |
588 | tests/transform_all.c \ | |
589 | tests/session.c \ | |
590 | tests/strutil.c \ | |
591 | tests/version.c \ | |
592 | tests/driver_all.c \ | |
593 | tests/device.c \ | |
6b71bf1b UH |
594 | tests/trigger.c \ |
595 | tests/analog.c | |
02a2bf68 | 596 | |
65489c1a | 597 | tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) |
dd8b5f56 | 598 | |
580ed400 ML |
599 | BUILD_EXTRA = |
600 | INSTALL_EXTRA = | |
7252a09e | 601 | UNINSTALL_EXTRA = |
580ed400 ML |
602 | CLEAN_EXTRA = |
603 | ||
c23c8659 ML |
604 | if BINDINGS_CXX |
605 | ||
52ff4f6a | 606 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la |
c23c8659 | 607 | |
52ff4f6a | 608 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp |
c23c8659 | 609 | |
9d8f363d | 610 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) |
1f61c22f | 611 | bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
fc8f82e9 | 612 | |
0959ed3d UH |
613 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx |
614 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
122322a9 DE |
615 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp |
616 | nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
161dc24d | 617 | bindings/cxx/include/libsigrokcxx/enums.hpp |
c23c8659 | 618 | |
52ff4f6a | 619 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc |
c23c8659 | 620 | |
3532ed01 | 621 | doxy/xml/index.xml: include/libsigrok/libsigrok.h |
7f82ec4d | 622 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null |
580ed400 | 623 | |
cf5b338e | 624 | bindings/swig/enums.i: bindings/cxx/enums.timestamp |
580ed400 | 625 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp |
161dc24d | 626 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp |
c23c8659 | 627 | |
b595a458 | 628 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ |
c23c8659 | 629 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
b595a458 | 630 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml |
f2a189f0 | 631 | $(AM_V_at)touch $@ |
c23c8659 | 632 | |
580ed400 | 633 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
cf5b338e | 634 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
c23c8659 | 635 | |
580ed400 | 636 | cxx-clean: |
3532ed01 | 637 | rm -rf doxy/ |
bd4fda24 | 638 | rm -rf bindings/cxx/doxy/ |
45ec8f77 | 639 | rm -f bindings/swig/enums.i |
580ed400 | 640 | rm -f bindings/cxx/enums.cpp |
161dc24d | 641 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp |
580ed400 | 642 | rm -f bindings/cxx/enums.timestamp |
c23c8659 | 643 | |
580ed400 ML |
644 | CLEAN_EXTRA += cxx-clean |
645 | ||
646 | endif | |
f7740954 | 647 | |
bd4fda24 ML |
648 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml |
649 | ||
161dc24d | 650 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ |
bd4fda24 | 651 | bindings/cxx/enums.timestamp |
33c84e81 | 652 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null |
bd4fda24 | 653 | |
8ebf1469 DE |
654 | # Macro definitions to be used by the SWIG parser. |
655 | swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS= | |
656 | ||
f7740954 ML |
657 | if BINDINGS_PYTHON |
658 | ||
d1785122 | 659 | PDIR = bindings/python |
df979d6d ML |
660 | PDOC_START = bindings/python/sigrok/core/doc_start.i |
661 | PDOC_END = bindings/python/sigrok/core/doc_end.i | |
bd4fda24 | 662 | |
b020b81b | 663 | setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CXX='$(CXX)' CFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' CXXFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' LDADD='$(PYSIGROK_LIBS)' |
c05a0ba5 DE |
664 | setup_quiet = --quiet |
665 | setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet) | |
a9cb82ac | 666 | |
df979d6d | 667 | $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 668 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core |
df979d6d ML |
669 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@ |
670 | ||
671 | $(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
672 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core | |
673 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@ | |
d1785122 ML |
674 | |
675 | python-build: $(PDIR)/timestamp | |
676 | ||
fd31865e | 677 | $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \ |
36e3f6a9 ML |
678 | bindings/swig/classes.i bindings/swig/templates.i \ |
679 | bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \ | |
680 | $(library_include_HEADERS) \ | |
df979d6d | 681 | $(nodist_library_include_HEADERS) \ |
fd31865e ML |
682 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
683 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 684 | @ORDER@ bindings/cxx/libsigrokcxx.la |
a9cb82ac | 685 | $(AM_V_at)$(setup_py) clean --all 2>/dev/null |
8ebf1469 | 686 | $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py |
a9cb82ac | 687 | $(AM_V_at): >$@ |
f7740954 | 688 | |
a9cb82ac DE |
689 | python-install: |
690 | $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" | |
452986be DE |
691 | destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ |
692 | --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" | |
f7740954 | 693 | |
c26162ff | 694 | python-clean: |
a9cb82ac DE |
695 | -$(AM_V_at)rm -f $(PDIR)/timestamp |
696 | -$(AM_V_at)rm -fr $(PDIR)/doxy | |
c05a0ba5 | 697 | -$(AM_V_at)$(setup_py) clean --all 2>/dev/null |
6a8c1d68 ML |
698 | |
699 | python-doc: | |
a9cb82ac | 700 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null |
f7740954 ML |
701 | |
702 | BUILD_EXTRA += python-build | |
703 | INSTALL_EXTRA += python-install | |
704 | CLEAN_EXTRA += python-clean | |
705 | ||
706 | endif | |
707 | ||
27d44cf6 AJ |
708 | if BINDINGS_RUBY |
709 | ||
710 | RDIR = bindings/ruby | |
711 | RDOC = $(RDIR)/doc.i | |
712 | RWRAP = $(RDIR)/classes_wrap.cpp | |
713 | ROBJ = $(RWRAP:.cpp=.o) | |
e9227902 | 714 | REXT = $(RDIR)/sigrok.$(RUBY_DLEXT) |
27d44cf6 AJ |
715 | |
716 | $(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
17165513 | 717 | $(AM_V_at)test -d $(RDIR) || $(MKDIR_P) $(RDIR) |
27d44cf6 AJ |
718 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@ |
719 | ||
d8f96097 | 720 | $(RWRAP): $(srcdir)/$(RDIR)/classes.i $(RDOC) \ |
27d44cf6 AJ |
721 | bindings/swig/classes.i bindings/swig/templates.i \ |
722 | bindings/swig/enums.i | |
d8f96097 | 723 | $(AM_V_GEN)$(SWIG) -ruby -c++ -Ibindings -Ibindings/cxx/include -I$(RDIR) $(local_includes) $(swig_defs) -o $@ $(srcdir)/$(RDIR)/classes.i |
27d44cf6 AJ |
724 | |
725 | $(ROBJ): $(RWRAP) \ | |
726 | $(library_include_HEADERS) \ | |
727 | $(nodist_library_include_HEADERS) \ | |
728 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
729 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
d8f96097 | 730 | $(AM_V_CXX)$(CXX) $(RBSIGROK_CFLAGS) -I. -Iinclude -Ibindings/cxx/include $(local_includes) -fPIC -o $@ -c $(RWRAP) |
27d44cf6 AJ |
731 | |
732 | $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la | |
d8f96097 | 733 | $(AM_V_CXXLD)$(CXX) -shared -o $@ $(ROBJ) -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS) |
27d44cf6 AJ |
734 | |
735 | ruby-build: $(REXT) | |
736 | ||
737 | ruby-install: $(REXT) | |
e9227902 | 738 | $(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
d8f96097 | 739 | $(INSTALL) $(REXT) $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
27d44cf6 | 740 | |
c4a1015a MS |
741 | ruby-uninstall: |
742 | rm -f $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)/sigrok.$(RUBY_DLEXT) | |
743 | ||
27d44cf6 AJ |
744 | ruby-clean: |
745 | -$(AM_V_at)rm -fr $(RDIR)/doc | |
17165513 | 746 | -$(AM_V_at)rm -f $(REXT) $(ROBJ) $(RWRAP) $(RDOC) |
27d44cf6 AJ |
747 | |
748 | ruby-doc: $(RWRAP) | |
d8f96097 | 749 | $(AM_V_at)yard doc -o $(RDIR)/doc $(RWRAP) |
27d44cf6 AJ |
750 | |
751 | BUILD_EXTRA += ruby-build | |
752 | INSTALL_EXTRA += ruby-install | |
c4a1015a | 753 | UNINSTALL_EXTRA += ruby-uninstall |
27d44cf6 AJ |
754 | CLEAN_EXTRA += ruby-clean |
755 | ||
756 | endif | |
757 | ||
9fcf4d0b ML |
758 | if BINDINGS_JAVA |
759 | ||
760 | JDIR = bindings/java | |
90bd7656 ML |
761 | JPKG = org/sigrok/core |
762 | JCLS = $(JDIR)/$(JPKG)/classes | |
763 | JINT = $(JDIR)/$(JPKG)/interfaces | |
33c84e81 | 764 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java |
90bd7656 | 765 | JSWG = $(JCLS)/classes.i |
bd4fda24 | 766 | JDOC = $(JCLS)/doc.i |
90bd7656 | 767 | JCXX = $(JCLS)/classes_wrap.cxx |
9fcf4d0b ML |
768 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
769 | JJAR = $(JDIR)/sigrok-core.jar | |
770 | ||
a9cb82ac DE |
771 | java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB) |
772 | ||
9fcf4d0b ML |
773 | java-build: $(JJAR) $(JLIB) |
774 | ||
dbde3b65 | 775 | $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 776 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) |
dbde3b65 | 777 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@ |
bd4fda24 | 778 | |
36e3f6a9 ML |
779 | $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \ |
780 | bindings/swig/templates.i bindings/swig/enums.i \ | |
fd31865e ML |
781 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
782 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
a9cb82ac | 783 | -$(AM_V_at)rm -f $(java_cleanfiles) |
8ebf1469 | 784 | $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \ |
4c9208a7 | 785 | -java -package org.sigrok.core.classes \ |
dbde3b65 DE |
786 | -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ |
787 | -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) | |
9fcf4d0b | 788 | |
90bd7656 | 789 | $(JJAR): $(JCXX) |
1f61c22f | 790 | $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC) |
f2a189f0 | 791 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 792 | |
fd31865e ML |
793 | $(JLIB): $(JCXX) \ |
794 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) \ | |
795 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
796 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 797 | @ORDER@ bindings/cxx/libsigrokcxx.la |
9d8f363d | 798 | $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) $(LDFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 | 799 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
9d8f363d | 800 | -lsigrokcxx $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) -o $(JLIB) |
9fcf4d0b ML |
801 | |
802 | java-install: | |
df705a7a | 803 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni |
8e0f9bf7 | 804 | $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni |
df705a7a | 805 | $(INSTALL) -d $(DESTDIR)$(datadir)/java |
8e0f9bf7 | 806 | $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java |
9fcf4d0b | 807 | |
7252a09e DE |
808 | java-uninstall: |
809 | -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar | |
810 | -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so | |
811 | ||
9fcf4d0b | 812 | java-clean: |
45ec8f77 | 813 | -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC) |
a9cb82ac | 814 | -$(AM_V_at)rm -fr $(JDIR)/doxy |
8a314e90 ML |
815 | |
816 | java-doc: | |
a9cb82ac | 817 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile |
9fcf4d0b ML |
818 | |
819 | BUILD_EXTRA += java-build | |
820 | INSTALL_EXTRA += java-install | |
7252a09e | 821 | UNINSTALL_EXTRA += java-uninstall |
9fcf4d0b ML |
822 | CLEAN_EXTRA += java-clean |
823 | ||
824 | endif | |
825 | ||
f7740954 ML |
826 | all-local: $(BUILD_EXTRA) |
827 | install-exec-local: $(INSTALL_EXTRA) | |
7252a09e | 828 | uninstall-local: $(UNINSTALL_EXTRA) |
d1785122 | 829 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 830 | |
37829c15 DE |
831 | .PHONY: dist-changelog |
832 | ||
833 | dist-hook: dist-changelog | |
834 | ||
835 | dist-changelog: | |
836 | $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \ | |
837 | cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \ | |
838 | elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \ | |
839 | mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ | |
840 | else \ | |
841 | rm -f .ChangeLog.tmp; exit 1; \ | |
842 | fi | |
0fc12d66 | 843 |