]>
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 | 52 | src/backend.c \ |
6ad2fbaa | 53 | src/conversion.c \ |
155b680d BV |
54 | src/device.c \ |
55 | src/session.c \ | |
56 | src/session_file.c \ | |
57 | src/session_driver.c \ | |
155b680d BV |
58 | src/hwdriver.c \ |
59 | src/trigger.c \ | |
60 | src/soft-trigger.c \ | |
fb019a0e | 61 | src/analog.c \ |
24287ea9 | 62 | src/fallback.c \ |
bee24666 | 63 | src/resource.c \ |
155b680d BV |
64 | src/strutil.c \ |
65 | src/log.c \ | |
66 | src/version.c \ | |
67 | src/error.c \ | |
aea4e458 LPC |
68 | src/std.c \ |
69 | src/sw_limits.c | |
960a75e4 | 70 | |
155b680d BV |
71 | # Input modules |
72 | libsigrok_la_SOURCES += \ | |
155b680d | 73 | src/input/input.c \ |
b84cba4d | 74 | src/input/binary.c \ |
02e24c0c | 75 | src/input/chronovu_la8.c \ |
41d214f6 | 76 | src/input/csv.c \ |
e1b115bd | 77 | src/input/logicport.c \ |
e6b15cb5 | 78 | src/input/raw_analog.c \ |
6d2897e3 | 79 | src/input/trace32_ad.c \ |
7db06394 | 80 | src/input/vcd.c \ |
2003be8c UH |
81 | src/input/wav.c \ |
82 | src/input/null.c | |
67bd8055 | 83 | |
155b680d BV |
84 | # Output modules |
85 | libsigrok_la_SOURCES += \ | |
86 | src/output/output.c \ | |
87 | src/output/analog.c \ | |
88 | src/output/ascii.c \ | |
89 | src/output/bits.c \ | |
90 | src/output/binary.c \ | |
91 | src/output/csv.c \ | |
92 | src/output/chronovu_la8.c \ | |
afaa75b9 | 93 | src/output/wav.c \ |
155b680d BV |
94 | src/output/hex.c \ |
95 | src/output/ols.c \ | |
3250d8c7 | 96 | src/output/srzip.c \ |
1af7497d UH |
97 | src/output/vcd.c \ |
98 | src/output/null.c | |
67bd8055 | 99 | |
988357ca UH |
100 | # Transform modules |
101 | libsigrok_la_SOURCES += \ | |
39f1752e | 102 | src/transform/transform.c \ |
43caa466 | 103 | src/transform/nop.c \ |
d74d30bb UH |
104 | src/transform/scale.c \ |
105 | src/transform/invert.c | |
988357ca | 106 | |
155b680d | 107 | # SCPI support |
67bd8055 | 108 | libsigrok_la_SOURCES += \ |
0a9d05dc | 109 | src/scpi.h \ |
155b680d BV |
110 | src/scpi/scpi.c \ |
111 | src/scpi/scpi_tcp.c | |
67bd8055 UH |
112 | if NEED_RPC |
113 | libsigrok_la_SOURCES += \ | |
155b680d BV |
114 | src/scpi/scpi_vxi.c \ |
115 | src/scpi/vxi_clnt.c \ | |
116 | src/scpi/vxi_xdr.c \ | |
117 | src/scpi/vxi.h | |
67bd8055 | 118 | endif |
7c8ae47d GS |
119 | # if HAVE_BLUETOOTH |
120 | libsigrok_la_SOURCES += \ | |
121 | src/bt/bt_bluez.c | |
122 | # endif | |
67bd8055 UH |
123 | if NEED_SERIAL |
124 | libsigrok_la_SOURCES += \ | |
155b680d | 125 | src/serial.c \ |
b79c3422 | 126 | src/serial_bt.c \ |
4417074c | 127 | src/serial_hid.c \ |
a10284cd | 128 | src/serial_hid_bu86x.c \ |
828eeea2 | 129 | src/serial_hid_ch9325.c \ |
616bc3a1 | 130 | src/serial_hid_cp2110.c \ |
ae4c1fb6 | 131 | src/serial_libsp.c \ |
155b680d | 132 | src/scpi/scpi_serial.c |
67bd8055 UH |
133 | endif |
134 | if NEED_USB | |
135 | libsigrok_la_SOURCES += \ | |
155b680d BV |
136 | src/ezusb.c \ |
137 | src/usb.c \ | |
138 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
139 | endif |
140 | if NEED_VISA | |
141 | libsigrok_la_SOURCES += \ | |
155b680d | 142 | src/scpi/scpi_visa.c |
67bd8055 | 143 | endif |
bb2a4ed4 ML |
144 | if NEED_GPIB |
145 | libsigrok_la_SOURCES += \ | |
7343ad1e | 146 | src/scpi/scpi_libgpib.c |
bb2a4ed4 | 147 | endif |
67bd8055 | 148 | |
f54ebe0c | 149 | # Modbus support |
daa39012 AJ |
150 | libsigrok_la_SOURCES += \ |
151 | src/modbus/modbus.c | |
4c938fc2 AJ |
152 | if NEED_SERIAL |
153 | libsigrok_la_SOURCES += \ | |
154 | src/modbus/modbus_serial_rtu.c | |
155 | endif | |
daa39012 | 156 | |
155b680d BV |
157 | # Hardware (DMM chip parsers) |
158 | libsigrok_la_SOURCES += \ | |
bd10287e GS |
159 | src/dmm/asycii.c \ |
160 | src/dmm/bm25x.c \ | |
0759e2f5 | 161 | src/dmm/bm86x.c \ |
bd10287e | 162 | src/dmm/dtm0660.c \ |
1c3098aa | 163 | src/dmm/eev121gw.c \ |
155b680d BV |
164 | src/dmm/es519xx.c \ |
165 | src/dmm/fs9721.c \ | |
166 | src/dmm/fs9922.c \ | |
167 | src/dmm/m2110.c \ | |
168 | src/dmm/metex14.c \ | |
dcd212f7 | 169 | src/dmm/ms2115b.c \ |
bd10287e | 170 | src/dmm/ms8250d.c \ |
a24c3f4a | 171 | src/dmm/rs9lcd.c \ |
c36f78f7 | 172 | src/dmm/ut372.c \ |
bd10287e | 173 | src/dmm/ut71x.c \ |
eed3dec8 | 174 | src/dmm/vc870.c \ |
9456d636 | 175 | src/dmm/vc96.c |
67bd8055 | 176 | |
6bcb3ee8 | 177 | # Hardware (LCR chip parsers) |
d378f100 | 178 | if NEED_SERIAL |
6bcb3ee8 JH |
179 | libsigrok_la_SOURCES += \ |
180 | src/lcr/es51919.c | |
d378f100 | 181 | endif |
6bcb3ee8 | 182 | |
e5d953b5 UH |
183 | # Hardware (Scale protocol parsers) |
184 | libsigrok_la_SOURCES += \ | |
185 | src/scale/kern.c | |
186 | ||
67bd8055 | 187 | # Hardware drivers |
393375e1 MC |
188 | noinst_LTLIBRARIES = src/libdrivers.la \ |
189 | src/libdrivers_head.la src/libdrivers_tail.la | |
dd5c48a6 | 190 | |
393375e1 MC |
191 | src/libdrivers.o: src/libdrivers.la \ |
192 | src/libdrivers_head.la src/libdrivers_tail.la | |
193 | $(AM_V_CCLD)$(LINK) src/libdrivers_head.la src/libdrivers.la \ | |
194 | src/libdrivers_tail.la | |
5d8b3913 AJ |
195 | src/libdrivers.lo: src/libdrivers.o |
196 | $(AM_V_GEN)echo "# Generated by libtool" > $@ | |
197 | $(AM_V_at)echo "pic_object='libdrivers.o'" >> $@ | |
198 | $(AM_V_at)echo "non_pic_object='libdrivers.o'" >> $@ | |
199 | ||
393375e1 MC |
200 | src_libdrivers_head_la_SOURCES = src/driver_list_start.c |
201 | ||
202 | src_libdrivers_tail_la_SOURCES = src/driver_list_stop.c | |
203 | ||
5d8b3913 | 204 | src_libdrivers_la_SOURCES = src/drivers.c |
dd5c48a6 | 205 | |
67bd8055 | 206 | if HW_AGILENT_DMM |
5d8b3913 | 207 | src_libdrivers_la_SOURCES += \ |
6cf1a87b UH |
208 | src/hardware/agilent-dmm/protocol.h \ |
209 | src/hardware/agilent-dmm/protocol.c \ | |
210 | src/hardware/agilent-dmm/api.c | |
67bd8055 | 211 | endif |
67bd8055 | 212 | if HW_APPA_55II |
5d8b3913 | 213 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
214 | src/hardware/appa-55ii/protocol.h \ |
215 | src/hardware/appa-55ii/protocol.c \ | |
216 | src/hardware/appa-55ii/api.c | |
67bd8055 | 217 | endif |
6e8d31d4 | 218 | if HW_ARACHNID_LABS_RE_LOAD_PRO |
5d8b3913 | 219 | src_libdrivers_la_SOURCES += \ |
6e8d31d4 UH |
220 | src/hardware/arachnid-labs-re-load-pro/protocol.h \ |
221 | src/hardware/arachnid-labs-re-load-pro/protocol.c \ | |
222 | src/hardware/arachnid-labs-re-load-pro/api.c | |
223 | endif | |
67bd8055 | 224 | if HW_ASIX_SIGMA |
5d8b3913 | 225 | src_libdrivers_la_SOURCES += \ |
3ba56876 | 226 | src/hardware/asix-sigma/protocol.h \ |
227 | src/hardware/asix-sigma/protocol.c \ | |
228 | src/hardware/asix-sigma/api.c | |
67bd8055 UH |
229 | endif |
230 | if HW_ATTEN_PPS3XXX | |
5d8b3913 | 231 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
232 | src/hardware/atten-pps3xxx/protocol.h \ |
233 | src/hardware/atten-pps3xxx/protocol.c \ | |
234 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 235 | endif |
dfaee1de | 236 | if HW_BAYLIBRE_ACME |
5d8b3913 | 237 | src_libdrivers_la_SOURCES += \ |
dfaee1de BG |
238 | src/hardware/baylibre-acme/protocol.h \ |
239 | src/hardware/baylibre-acme/protocol.c \ | |
289eebd7 BG |
240 | src/hardware/baylibre-acme/api.c \ |
241 | src/hardware/baylibre-acme/gpio.h \ | |
242 | src/hardware/baylibre-acme/gpio.c | |
dfaee1de | 243 | endif |
bb993797 | 244 | if HW_BEAGLELOGIC |
5d8b3913 | 245 | src_libdrivers_la_SOURCES += \ |
3db4b08b | 246 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
247 | src/hardware/beaglelogic/protocol.h \ |
248 | src/hardware/beaglelogic/protocol.c \ | |
88d2037b | 249 | src/hardware/beaglelogic/api.c \ |
9b2b3ef9 KA |
250 | src/hardware/beaglelogic/beaglelogic_native.c \ |
251 | src/hardware/beaglelogic/beaglelogic_tcp.c | |
bb993797 | 252 | endif |
67bd8055 | 253 | if HW_BRYMEN_BM86X |
5d8b3913 | 254 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
255 | src/hardware/brymen-bm86x/protocol.h \ |
256 | src/hardware/brymen-bm86x/protocol.c \ | |
257 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
258 | endif |
259 | if HW_BRYMEN_DMM | |
5d8b3913 | 260 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
261 | src/hardware/brymen-dmm/parser.c \ |
262 | src/hardware/brymen-dmm/protocol.h \ | |
263 | src/hardware/brymen-dmm/protocol.c \ | |
264 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
265 | endif |
266 | if HW_CEM_DT_885X | |
5d8b3913 | 267 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
268 | src/hardware/cem-dt-885x/protocol.h \ |
269 | src/hardware/cem-dt-885x/protocol.c \ | |
270 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
271 | endif |
272 | if HW_CENTER_3XX | |
5d8b3913 | 273 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
274 | src/hardware/center-3xx/protocol.h \ |
275 | src/hardware/center-3xx/protocol.c \ | |
276 | src/hardware/center-3xx/api.c | |
67bd8055 | 277 | endif |
7b356712 | 278 | if HW_CHRONOVU_LA |
5d8b3913 | 279 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
280 | src/hardware/chronovu-la/protocol.h \ |
281 | src/hardware/chronovu-la/protocol.c \ | |
282 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
283 | endif |
284 | if HW_COLEAD_SLM | |
5d8b3913 | 285 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
286 | src/hardware/colead-slm/protocol.h \ |
287 | src/hardware/colead-slm/protocol.c \ | |
288 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
289 | endif |
290 | if HW_CONRAD_DIGI_35_CPU | |
5d8b3913 | 291 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
292 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
293 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
294 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
295 | endif |
296 | if HW_DEMO | |
5d8b3913 | 297 | src_libdrivers_la_SOURCES += \ |
ba508e22 UH |
298 | src/hardware/demo/protocol.h \ |
299 | src/hardware/demo/protocol.c \ | |
300 | src/hardware/demo/api.c | |
67bd8055 | 301 | endif |
44b46d70 | 302 | if HW_DREAMSOURCELAB_DSLOGIC |
adcb9951 | 303 | src_libdrivers_la_SOURCES += \ |
44b46d70 UH |
304 | src/hardware/dreamsourcelab-dslogic/protocol.h \ |
305 | src/hardware/dreamsourcelab-dslogic/protocol.c \ | |
306 | src/hardware/dreamsourcelab-dslogic/api.c | |
adcb9951 | 307 | endif |
e756c595 J |
308 | if HW_FLUKE_45 |
309 | src_libdrivers_la_SOURCES += \ | |
310 | src/hardware/fluke-45/protocol.h \ | |
311 | src/hardware/fluke-45/protocol.c \ | |
312 | src/hardware/fluke-45/api.c | |
313 | endif | |
67bd8055 | 314 | if HW_FLUKE_DMM |
5d8b3913 | 315 | src_libdrivers_la_SOURCES += \ |
2cb232a9 UH |
316 | src/hardware/fluke-dmm/protocol.h \ |
317 | src/hardware/fluke-dmm/protocol.c \ | |
155b680d | 318 | src/hardware/fluke-dmm/api.c |
67bd8055 | 319 | endif |
f2273382 | 320 | if HW_FTDI_LA |
5d8b3913 | 321 | src_libdrivers_la_SOURCES += \ |
f2273382 UH |
322 | src/hardware/ftdi-la/protocol.h \ |
323 | src/hardware/ftdi-la/protocol.c \ | |
324 | src/hardware/ftdi-la/api.c | |
4f7fdcdd | 325 | endif |
67bd8055 | 326 | if HW_FX2LAFW |
5d8b3913 | 327 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
328 | src/hardware/fx2lafw/protocol.h \ |
329 | src/hardware/fx2lafw/protocol.c \ | |
adcb9951 | 330 | src/hardware/fx2lafw/api.c |
67bd8055 UH |
331 | endif |
332 | if HW_GMC_MH_1X_2X | |
5d8b3913 | 333 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
334 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
335 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
336 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 | 337 | endif |
7c198f96 | 338 | if HW_GWINSTEK_GDS_800 |
5d8b3913 | 339 | src_libdrivers_la_SOURCES += \ |
7c198f96 ML |
340 | src/hardware/gwinstek-gds-800/protocol.h \ |
341 | src/hardware/gwinstek-gds-800/protocol.c \ | |
342 | src/hardware/gwinstek-gds-800/api.c | |
343 | endif | |
b872ab7d BS |
344 | if HW_GWINSTEK_GPD |
345 | src_libdrivers_la_SOURCES += \ | |
346 | src/hardware/gwinstek-gpd/protocol.h \ | |
347 | src/hardware/gwinstek-gpd/protocol.c \ | |
348 | src/hardware/gwinstek-gpd/api.c | |
349 | endif | |
67bd8055 | 350 | if HW_HAMEG_HMO |
5d8b3913 | 351 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
352 | src/hardware/hameg-hmo/protocol.h \ |
353 | src/hardware/hameg-hmo/protocol.c \ | |
354 | src/hardware/hameg-hmo/api.c | |
67bd8055 | 355 | endif |
6a25fa42 AZ |
356 | if HW_HANTEK_4032L |
357 | src_libdrivers_la_SOURCES += \ | |
358 | src/hardware/hantek-4032l/protocol.h \ | |
359 | src/hardware/hantek-4032l/protocol.c \ | |
360 | src/hardware/hantek-4032l/api.c | |
361 | endif | |
5089a143 AZ |
362 | if HW_HANTEK_6XXX |
363 | src_libdrivers_la_SOURCES += \ | |
364 | src/hardware/hantek-6xxx/protocol.h \ | |
365 | src/hardware/hantek-6xxx/protocol.c \ | |
366 | src/hardware/hantek-6xxx/api.c | |
367 | endif | |
67bd8055 | 368 | if HW_HANTEK_DSO |
5d8b3913 | 369 | src_libdrivers_la_SOURCES += \ |
caeb8d7a UH |
370 | src/hardware/hantek-dso/protocol.h \ |
371 | src/hardware/hantek-dso/protocol.c \ | |
155b680d | 372 | src/hardware/hantek-dso/api.c |
67bd8055 | 373 | endif |
00b2a092 | 374 | if HW_HP_3457A |
5d8b3913 | 375 | src_libdrivers_la_SOURCES += \ |
00b2a092 AG |
376 | src/hardware/hp-3457a/protocol.h \ |
377 | src/hardware/hp-3457a/protocol.c \ | |
378 | src/hardware/hp-3457a/api.c | |
379 | endif | |
1d9eebf4 FS |
380 | if HW_HP_3478A |
381 | src_libdrivers_la_SOURCES += \ | |
382 | src/hardware/hp-3478a/protocol.h \ | |
383 | src/hardware/hp-3478a/protocol.c \ | |
384 | src/hardware/hp-3478a/api.c | |
385 | endif | |
05ac4a98 | 386 | if HW_HUNG_CHANG_DSO_2100 |
5d8b3913 | 387 | src_libdrivers_la_SOURCES += \ |
05ac4a98 DG |
388 | src/hardware/hung-chang-dso-2100/protocol.h \ |
389 | src/hardware/hung-chang-dso-2100/protocol.c \ | |
390 | src/hardware/hung-chang-dso-2100/api.c | |
391 | endif | |
67bd8055 | 392 | if HW_IKALOGIC_SCANALOGIC2 |
5d8b3913 | 393 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
394 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
395 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
396 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
397 | endif |
398 | if HW_IKALOGIC_SCANAPLUS | |
5d8b3913 | 399 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
400 | src/hardware/ikalogic-scanaplus/protocol.h \ |
401 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
402 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 | 403 | endif |
8a9788e2 | 404 | if HW_IPDBG_LA |
a4210e18 | 405 | src_libdrivers_la_SOURCES += \ |
8a9788e2 UH |
406 | src/hardware/ipdbg-la/protocol.h \ |
407 | src/hardware/ipdbg-la/protocol.c \ | |
408 | src/hardware/ipdbg-la/api.c | |
a4210e18 | 409 | endif |
67bd8055 | 410 | if HW_KECHENG_KC_330B |
5d8b3913 | 411 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
412 | src/hardware/kecheng-kc-330b/protocol.h \ |
413 | src/hardware/kecheng-kc-330b/protocol.c \ | |
414 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 | 415 | endif |
9380ec2f | 416 | if HW_KERN_SCALE |
5d8b3913 | 417 | src_libdrivers_la_SOURCES += \ |
9380ec2f UH |
418 | src/hardware/kern-scale/protocol.h \ |
419 | src/hardware/kern-scale/protocol.c \ | |
420 | src/hardware/kern-scale/api.c | |
421 | endif | |
16fc7ee2 | 422 | if HW_KORAD_KAXXXXP |
5d8b3913 | 423 | src_libdrivers_la_SOURCES += \ |
16fc7ee2 UH |
424 | src/hardware/korad-kaxxxxp/protocol.h \ |
425 | src/hardware/korad-kaxxxxp/protocol.c \ | |
426 | src/hardware/korad-kaxxxxp/api.c | |
e75ee7de | 427 | endif |
67bd8055 | 428 | if HW_LASCAR_EL_USB |
5d8b3913 | 429 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
430 | src/hardware/lascar-el-usb/protocol.h \ |
431 | src/hardware/lascar-el-usb/protocol.c \ | |
432 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 433 | endif |
c7b17bcb | 434 | if HW_LECROY_LOGICSTUDIO |
5d8b3913 | 435 | src_libdrivers_la_SOURCES += \ |
c7b17bcb TS |
436 | src/hardware/lecroy-logicstudio/protocol.h \ |
437 | src/hardware/lecroy-logicstudio/protocol.c \ | |
438 | src/hardware/lecroy-logicstudio/api.c | |
439 | endif | |
e3b83c5e SS |
440 | if HW_LECROY_XSTREAM |
441 | src_libdrivers_la_SOURCES += \ | |
442 | src/hardware/lecroy-xstream/protocol.h \ | |
443 | src/hardware/lecroy-xstream/protocol.c \ | |
444 | src/hardware/lecroy-xstream/api.c | |
445 | endif | |
8f4e922f | 446 | if HW_MANSON_HCS_3XXX |
5d8b3913 | 447 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
448 | src/hardware/manson-hcs-3xxx/protocol.h \ |
449 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
450 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 451 | endif |
e1ccfb19 | 452 | if HW_MAYNUO_M97 |
5d8b3913 | 453 | src_libdrivers_la_SOURCES += \ |
e1ccfb19 AJ |
454 | src/hardware/maynuo-m97/protocol.h \ |
455 | src/hardware/maynuo-m97/protocol.c \ | |
456 | src/hardware/maynuo-m97/api.c | |
457 | endif | |
a5c0259c GS |
458 | if HW_MICROCHIP_PICKIT2 |
459 | src_libdrivers_la_SOURCES += \ | |
460 | src/hardware/microchip-pickit2/protocol.h \ | |
461 | src/hardware/microchip-pickit2/protocol.c \ | |
462 | src/hardware/microchip-pickit2/api.c | |
463 | endif | |
67bd8055 | 464 | if HW_MIC_985XX |
5d8b3913 | 465 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
466 | src/hardware/mic-985xx/protocol.h \ |
467 | src/hardware/mic-985xx/protocol.c \ | |
468 | src/hardware/mic-985xx/api.c | |
67bd8055 | 469 | endif |
41b7bd01 | 470 | if HW_MOTECH_LPS_30X |
5d8b3913 | 471 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
472 | src/hardware/motech-lps-30x/protocol.h \ |
473 | src/hardware/motech-lps-30x/protocol.c \ | |
474 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 475 | endif |
67bd8055 | 476 | if HW_NORMA_DMM |
5d8b3913 | 477 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
478 | src/hardware/norma-dmm/protocol.h \ |
479 | src/hardware/norma-dmm/protocol.c \ | |
480 | src/hardware/norma-dmm/api.c | |
67bd8055 | 481 | endif |
d4b38748 | 482 | if HW_OPENBENCH_LOGIC_SNIFFER |
5d8b3913 | 483 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
484 | src/hardware/openbench-logic-sniffer/protocol.h \ |
485 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
486 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 | 487 | endif |
5a2c71cc | 488 | if HW_PCE_322A |
5d8b3913 | 489 | src_libdrivers_la_SOURCES += \ |
5a2c71cc GH |
490 | src/hardware/pce-322a/protocol.h \ |
491 | src/hardware/pce-322a/protocol.c \ | |
492 | src/hardware/pce-322a/api.c | |
493 | endif | |
4bd80e12 | 494 | if HW_PIPISTRELLO_OLS |
5d8b3913 | 495 | src_libdrivers_la_SOURCES += \ |
4bd80e12 | 496 | src/hardware/pipistrello-ols/protocol.h \ |
497 | src/hardware/pipistrello-ols/protocol.c \ | |
498 | src/hardware/pipistrello-ols/api.c | |
499 | endif | |
0549416e JC |
500 | if HW_RDTECH_DPS |
501 | src_libdrivers_la_SOURCES += \ | |
502 | src/hardware/rdtech-dps/protocol.h \ | |
503 | src/hardware/rdtech-dps/protocol.c \ | |
504 | src/hardware/rdtech-dps/api.c | |
505 | endif | |
67bd8055 | 506 | if HW_RIGOL_DS |
5d8b3913 | 507 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
508 | src/hardware/rigol-ds/protocol.h \ |
509 | src/hardware/rigol-ds/protocol.c \ | |
510 | src/hardware/rigol-ds/api.c | |
67bd8055 | 511 | endif |
a28b3df1 VI |
512 | if HW_ROHDE_SCHWARZ_SME_0X |
513 | src_libdrivers_la_SOURCES += \ | |
514 | src/hardware/rohde-schwarz-sme-0x/protocol.h \ | |
515 | src/hardware/rohde-schwarz-sme-0x/protocol.c \ | |
516 | src/hardware/rohde-schwarz-sme-0x/api.c | |
517 | endif | |
67bd8055 | 518 | if HW_SALEAE_LOGIC16 |
5d8b3913 | 519 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
520 | src/hardware/saleae-logic16/protocol.h \ |
521 | src/hardware/saleae-logic16/protocol.c \ | |
522 | src/hardware/saleae-logic16/api.c | |
67bd8055 | 523 | endif |
b6189f7c | 524 | if HW_SALEAE_LOGIC_PRO |
a8e913c4 | 525 | src_libdrivers_la_SOURCES += \ |
b6189f7c UH |
526 | src/hardware/saleae-logic-pro/protocol.h \ |
527 | src/hardware/saleae-logic-pro/protocol.c \ | |
528 | src/hardware/saleae-logic-pro/api.c | |
a8e913c4 | 529 | endif |
7a396ff5 GS |
530 | if HW_SCPI_DMM |
531 | src_libdrivers_la_SOURCES += \ | |
532 | src/hardware/scpi-dmm/protocol.h \ | |
533 | src/hardware/scpi-dmm/protocol.c \ | |
534 | src/hardware/scpi-dmm/api.c | |
535 | endif | |
ca1a7cb5 | 536 | if HW_SCPI_PPS |
5d8b3913 | 537 | src_libdrivers_la_SOURCES += \ |
ca1a7cb5 BV |
538 | src/hardware/scpi-pps/protocol.h \ |
539 | src/hardware/scpi-pps/protocol.c \ | |
d4eabea8 | 540 | src/hardware/scpi-pps/profiles.c \ |
ca1a7cb5 BV |
541 | src/hardware/scpi-pps/api.c |
542 | endif | |
67bd8055 | 543 | if HW_SERIAL_DMM |
5d8b3913 | 544 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
545 | src/hardware/serial-dmm/protocol.h \ |
546 | src/hardware/serial-dmm/protocol.c \ | |
547 | src/hardware/serial-dmm/api.c | |
67bd8055 | 548 | endif |
503220ec GS |
549 | if HW_SERIAL_LCR |
550 | src_libdrivers_la_SOURCES += \ | |
bf5c4d46 GS |
551 | src/hardware/serial-lcr/protocol.h \ |
552 | src/hardware/serial-lcr/protocol.c \ | |
503220ec GS |
553 | src/hardware/serial-lcr/api.c |
554 | endif | |
89f5fab9 | 555 | if HW_SIGLENT_SDS |
556 | src_libdrivers_la_SOURCES += \ | |
557 | src/hardware/siglent-sds/protocol.h \ | |
558 | src/hardware/siglent-sds/protocol.c \ | |
559 | src/hardware/siglent-sds/api.c | |
560 | endif | |
67bd8055 | 561 | if HW_SYSCLK_LWLA |
5d8b3913 | 562 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
563 | src/hardware/sysclk-lwla/lwla.h \ |
564 | src/hardware/sysclk-lwla/lwla.c \ | |
be64f90b DE |
565 | src/hardware/sysclk-lwla/lwla1016.c \ |
566 | src/hardware/sysclk-lwla/lwla1034.c \ | |
155b680d BV |
567 | src/hardware/sysclk-lwla/protocol.h \ |
568 | src/hardware/sysclk-lwla/protocol.c \ | |
569 | src/hardware/sysclk-lwla/api.c | |
67bd8055 | 570 | endif |
8da8c826 VV |
571 | if HW_SYSCLK_SLA5032 |
572 | src_libdrivers_la_SOURCES += \ | |
8da8c826 VV |
573 | src/hardware/sysclk-sla5032/protocol.h \ |
574 | src/hardware/sysclk-sla5032/protocol.c \ | |
575 | src/hardware/sysclk-sla5032/api.c | |
576 | endif | |
67bd8055 | 577 | if HW_TELEINFO |
5d8b3913 | 578 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
579 | src/hardware/teleinfo/protocol.h \ |
580 | src/hardware/teleinfo/protocol.c \ | |
581 | src/hardware/teleinfo/api.c | |
67bd8055 | 582 | endif |
0acdd793 | 583 | if HW_TESTO |
5d8b3913 | 584 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
585 | src/hardware/testo/protocol.h \ |
586 | src/hardware/testo/protocol.c \ | |
587 | src/hardware/testo/api.c | |
0acdd793 | 588 | endif |
67bd8055 | 589 | if HW_TONDAJ_SL_814 |
5d8b3913 | 590 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
591 | src/hardware/tondaj-sl-814/protocol.h \ |
592 | src/hardware/tondaj-sl-814/protocol.c \ | |
593 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
594 | endif |
595 | if HW_UNI_T_DMM | |
5d8b3913 | 596 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
597 | src/hardware/uni-t-dmm/protocol.h \ |
598 | src/hardware/uni-t-dmm/protocol.c \ | |
599 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
600 | endif |
601 | if HW_UNI_T_UT32X | |
5d8b3913 | 602 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
603 | src/hardware/uni-t-ut32x/protocol.h \ |
604 | src/hardware/uni-t-ut32x/protocol.c \ | |
605 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
606 | endif |
607 | if HW_VICTOR_DMM | |
5d8b3913 | 608 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
609 | src/hardware/victor-dmm/protocol.h \ |
610 | src/hardware/victor-dmm/protocol.c \ | |
611 | src/hardware/victor-dmm/api.c | |
67bd8055 | 612 | endif |
10763937 | 613 | if HW_YOKOGAWA_DLM |
5d8b3913 | 614 | src_libdrivers_la_SOURCES += \ |
10763937 SA |
615 | src/hardware/yokogawa-dlm/protocol.h \ |
616 | src/hardware/yokogawa-dlm/protocol.c \ | |
617 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
618 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
619 | src/hardware/yokogawa-dlm/api.c | |
620 | endif | |
67bd8055 | 621 | if HW_ZEROPLUS_LOGIC_CUBE |
5d8b3913 | 622 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
623 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
624 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
625 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
626 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
627 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
628 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
629 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 | 630 | endif |
c527132a SBO |
631 | if HW_ZKETECH_EBD_USB |
632 | src_libdrivers_la_SOURCES += \ | |
633 | src/hardware/zketech-ebd-usb/protocol.h \ | |
634 | src/hardware/zketech-ebd-usb/protocol.c \ | |
635 | src/hardware/zketech-ebd-usb/api.c | |
636 | endif | |
67bd8055 | 637 | |
5d8b3913 | 638 | libsigrok_la_LIBADD = src/libdrivers.lo $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS) |
1f61c22f | 639 | libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
ff101fca | 640 | |
45c59c8b | 641 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
642 | library_include_HEADERS = \ |
643 | include/libsigrok/libsigrok.h \ | |
122322a9 DE |
644 | include/libsigrok/proto.h |
645 | nodist_library_include_HEADERS = \ | |
63d0fb75 | 646 | include/libsigrok/version.h |
155b680d | 647 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 648 | |
8a7b47cd UH |
649 | pkgconfigdir = $(libdir)/pkgconfig |
650 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 651 | |
a7600dc5 | 652 | mimeappdir = $(datadir)/mime/packages |
567d1fea UH |
653 | mimeapp_DATA = contrib/vnd.sigrok.session.xml |
654 | ||
655 | mimeicondir = $(datadir)/icons/hicolor/48x48/mimetypes | |
656 | mimeicon_DATA = contrib/libsigrok.png | |
657 | ||
658 | mimeiconscalabledir = $(datadir)/icons/hicolor/scalable/mimetypes | |
659 | mimeiconscalable_DATA = contrib/libsigrok.svg | |
660 | ||
67bd8055 UH |
661 | EXTRA_DIST = \ |
662 | Doxyfile \ | |
663 | HACKING \ | |
664 | README.devices \ | |
31ac7735 DE |
665 | bindings/cxx/ConfigKey_methods.cpp \ |
666 | bindings/cxx/ConfigKey_methods.hpp \ | |
667 | bindings/cxx/ConfigKey_methods.i \ | |
668 | bindings/cxx/Doxyfile \ | |
669 | bindings/cxx/QuantityFlag_methods.cpp \ | |
670 | bindings/cxx/QuantityFlag_methods.hpp \ | |
671 | bindings/cxx/enums.py \ | |
672 | bindings/python/Doxyfile \ | |
673 | bindings/python/setup.py \ | |
674 | bindings/python/sigrok/__init__.py \ | |
675 | bindings/python/sigrok/core/__init__.py \ | |
676 | bindings/python/sigrok/core/classes.i \ | |
c4a1015a | 677 | bindings/ruby/classes.i \ |
31ac7735 DE |
678 | bindings/java/Doxyfile \ |
679 | bindings/java/org/sigrok/core/classes/classes.i \ | |
680 | bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \ | |
681 | bindings/java/org/sigrok/core/interfaces/LogCallback.java \ | |
31ac7735 DE |
682 | bindings/swig/classes.i \ |
683 | bindings/swig/doc.py \ | |
0a9d05dc | 684 | bindings/swig/templates.i \ |
6b21d9a7 | 685 | contrib/libsigrok_112x112.png \ |
567d1fea UH |
686 | contrib/libsigrok.png \ |
687 | contrib/libsigrok.svg \ | |
688 | contrib/vnd.sigrok.session.xml \ | |
b2e9b6d4 UH |
689 | contrib/60-libsigrok.rules \ |
690 | contrib/61-libsigrok-plugdev.rules \ | |
691 | contrib/61-libsigrok-uaccess.rules | |
67bd8055 UH |
692 | |
693 | if HAVE_CHECK | |
02a2bf68 | 694 | TESTS = tests/main |
67bd8055 | 695 | check_PROGRAMS = ${TESTS} |
65489c1a | 696 | endif |
67bd8055 | 697 | |
02a2bf68 | 698 | tests_main_SOURCES = \ |
6592c369 | 699 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
700 | tests/lib.c \ |
701 | tests/lib.h \ | |
02a2bf68 UH |
702 | tests/main.c \ |
703 | tests/core.c \ | |
704 | tests/input_all.c \ | |
705 | tests/input_binary.c \ | |
706 | tests/output_all.c \ | |
707 | tests/transform_all.c \ | |
708 | tests/session.c \ | |
709 | tests/strutil.c \ | |
710 | tests/version.c \ | |
711 | tests/driver_all.c \ | |
712 | tests/device.c \ | |
6b71bf1b UH |
713 | tests/trigger.c \ |
714 | tests/analog.c | |
02a2bf68 | 715 | |
65489c1a | 716 | tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) |
dd8b5f56 | 717 | |
580ed400 ML |
718 | BUILD_EXTRA = |
719 | INSTALL_EXTRA = | |
7252a09e | 720 | UNINSTALL_EXTRA = |
580ed400 ML |
721 | CLEAN_EXTRA = |
722 | ||
09b2ca47 UH |
723 | libsigrok-uninstall: |
724 | -rmdir $(DESTDIR)$(includedir)/libsigrok | |
725 | ||
726 | UNINSTALL_EXTRA += libsigrok-uninstall | |
727 | ||
c23c8659 ML |
728 | if BINDINGS_CXX |
729 | ||
52ff4f6a | 730 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la |
c23c8659 | 731 | |
52ff4f6a | 732 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp |
c23c8659 | 733 | |
9d8f363d | 734 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) |
1f61c22f | 735 | bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
fc8f82e9 | 736 | |
0959ed3d UH |
737 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx |
738 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
122322a9 DE |
739 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp |
740 | nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
161dc24d | 741 | bindings/cxx/include/libsigrokcxx/enums.hpp |
c23c8659 | 742 | |
52ff4f6a | 743 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc |
c23c8659 | 744 | |
3532ed01 | 745 | doxy/xml/index.xml: include/libsigrok/libsigrok.h |
3535a6ee | 746 | $(AM_V_GEN)cd $(srcdir) && SRCDIR=$(abs_srcdir)/ BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null |
580ed400 | 747 | |
cf5b338e | 748 | bindings/swig/enums.i: bindings/cxx/enums.timestamp |
580ed400 | 749 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp |
161dc24d | 750 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp |
c23c8659 | 751 | |
b595a458 | 752 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ |
c23c8659 | 753 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
b595a458 | 754 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml |
f2a189f0 | 755 | $(AM_V_at)touch $@ |
c23c8659 | 756 | |
580ed400 | 757 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
cf5b338e | 758 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
c23c8659 | 759 | |
580ed400 | 760 | cxx-clean: |
3532ed01 | 761 | rm -rf doxy/ |
bd4fda24 | 762 | rm -rf bindings/cxx/doxy/ |
45ec8f77 | 763 | rm -f bindings/swig/enums.i |
580ed400 | 764 | rm -f bindings/cxx/enums.cpp |
161dc24d | 765 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp |
580ed400 | 766 | rm -f bindings/cxx/enums.timestamp |
c23c8659 | 767 | |
580ed400 ML |
768 | CLEAN_EXTRA += cxx-clean |
769 | ||
09b2ca47 UH |
770 | cxx-uninstall: |
771 | -rmdir $(DESTDIR)$(includedir)/libsigrokcxx | |
772 | ||
773 | UNINSTALL_EXTRA += cxx-uninstall | |
774 | ||
580ed400 | 775 | endif |
f7740954 | 776 | |
bd4fda24 ML |
777 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml |
778 | ||
161dc24d | 779 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ |
bd4fda24 | 780 | bindings/cxx/enums.timestamp |
3535a6ee | 781 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && SRCDIR=$(abs_srcdir)/bindings/cxx/ BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null |
bd4fda24 | 782 | |
8ebf1469 DE |
783 | # Macro definitions to be used by the SWIG parser. |
784 | swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS= | |
785 | ||
f7740954 ML |
786 | if BINDINGS_PYTHON |
787 | ||
d1785122 | 788 | PDIR = bindings/python |
df979d6d ML |
789 | PDOC_START = bindings/python/sigrok/core/doc_start.i |
790 | PDOC_END = bindings/python/sigrok/core/doc_end.i | |
bd4fda24 | 791 | |
b020b81b | 792 | 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 |
793 | setup_quiet = --quiet |
794 | setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet) | |
a9cb82ac | 795 | |
df979d6d | 796 | $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 797 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core |
df979d6d ML |
798 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@ |
799 | ||
800 | $(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
801 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core | |
802 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@ | |
d1785122 ML |
803 | |
804 | python-build: $(PDIR)/timestamp | |
805 | ||
fd31865e | 806 | $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \ |
36e3f6a9 ML |
807 | bindings/swig/classes.i bindings/swig/templates.i \ |
808 | bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \ | |
809 | $(library_include_HEADERS) \ | |
df979d6d | 810 | $(nodist_library_include_HEADERS) \ |
fd31865e ML |
811 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
812 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 813 | @ORDER@ bindings/cxx/libsigrokcxx.la |
a9cb82ac | 814 | $(AM_V_at)$(setup_py) clean --all 2>/dev/null |
8ebf1469 | 815 | $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py |
a9cb82ac | 816 | $(AM_V_at): >$@ |
f7740954 | 817 | |
a9cb82ac DE |
818 | python-install: |
819 | $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" | |
452986be DE |
820 | destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ |
821 | --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" | |
f7740954 | 822 | |
c26162ff | 823 | python-clean: |
a9cb82ac DE |
824 | -$(AM_V_at)rm -f $(PDIR)/timestamp |
825 | -$(AM_V_at)rm -fr $(PDIR)/doxy | |
c05a0ba5 | 826 | -$(AM_V_at)$(setup_py) clean --all 2>/dev/null |
6a8c1d68 ML |
827 | |
828 | python-doc: | |
3535a6ee | 829 | $(AM_V_at)cd $(srcdir)/$(PDIR) && SRCDIR="$(abs_srcdir)/$(PDIR)/" BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null |
f7740954 ML |
830 | |
831 | BUILD_EXTRA += python-build | |
832 | INSTALL_EXTRA += python-install | |
833 | CLEAN_EXTRA += python-clean | |
834 | ||
835 | endif | |
836 | ||
27d44cf6 AJ |
837 | if BINDINGS_RUBY |
838 | ||
839 | RDIR = bindings/ruby | |
840 | RDOC = $(RDIR)/doc.i | |
841 | RWRAP = $(RDIR)/classes_wrap.cpp | |
842 | ROBJ = $(RWRAP:.cpp=.o) | |
e9227902 | 843 | REXT = $(RDIR)/sigrok.$(RUBY_DLEXT) |
27d44cf6 AJ |
844 | |
845 | $(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
17165513 | 846 | $(AM_V_at)test -d $(RDIR) || $(MKDIR_P) $(RDIR) |
27d44cf6 AJ |
847 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@ |
848 | ||
d8f96097 | 849 | $(RWRAP): $(srcdir)/$(RDIR)/classes.i $(RDOC) \ |
27d44cf6 AJ |
850 | bindings/swig/classes.i bindings/swig/templates.i \ |
851 | bindings/swig/enums.i | |
d8f96097 | 852 | $(AM_V_GEN)$(SWIG) -ruby -c++ -Ibindings -Ibindings/cxx/include -I$(RDIR) $(local_includes) $(swig_defs) -o $@ $(srcdir)/$(RDIR)/classes.i |
27d44cf6 AJ |
853 | |
854 | $(ROBJ): $(RWRAP) \ | |
855 | $(library_include_HEADERS) \ | |
856 | $(nodist_library_include_HEADERS) \ | |
857 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
858 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
d8f96097 | 859 | $(AM_V_CXX)$(CXX) $(RBSIGROK_CFLAGS) -I. -Iinclude -Ibindings/cxx/include $(local_includes) -fPIC -o $@ -c $(RWRAP) |
27d44cf6 AJ |
860 | |
861 | $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la | |
d8f96097 | 862 | $(AM_V_CXXLD)$(CXX) -shared -o $@ $(ROBJ) -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS) |
27d44cf6 AJ |
863 | |
864 | ruby-build: $(REXT) | |
865 | ||
866 | ruby-install: $(REXT) | |
e9227902 | 867 | $(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
d8f96097 | 868 | $(INSTALL) $(REXT) $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
27d44cf6 | 869 | |
c4a1015a MS |
870 | ruby-uninstall: |
871 | rm -f $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)/sigrok.$(RUBY_DLEXT) | |
872 | ||
27d44cf6 AJ |
873 | ruby-clean: |
874 | -$(AM_V_at)rm -fr $(RDIR)/doc | |
17165513 | 875 | -$(AM_V_at)rm -f $(REXT) $(ROBJ) $(RWRAP) $(RDOC) |
27d44cf6 AJ |
876 | |
877 | ruby-doc: $(RWRAP) | |
d8f96097 | 878 | $(AM_V_at)yard doc -o $(RDIR)/doc $(RWRAP) |
27d44cf6 AJ |
879 | |
880 | BUILD_EXTRA += ruby-build | |
881 | INSTALL_EXTRA += ruby-install | |
c4a1015a | 882 | UNINSTALL_EXTRA += ruby-uninstall |
27d44cf6 AJ |
883 | CLEAN_EXTRA += ruby-clean |
884 | ||
885 | endif | |
886 | ||
9fcf4d0b ML |
887 | if BINDINGS_JAVA |
888 | ||
889 | JDIR = bindings/java | |
90bd7656 ML |
890 | JPKG = org/sigrok/core |
891 | JCLS = $(JDIR)/$(JPKG)/classes | |
892 | JINT = $(JDIR)/$(JPKG)/interfaces | |
33c84e81 | 893 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java |
90bd7656 | 894 | JSWG = $(JCLS)/classes.i |
bd4fda24 | 895 | JDOC = $(JCLS)/doc.i |
90bd7656 | 896 | JCXX = $(JCLS)/classes_wrap.cxx |
9fcf4d0b ML |
897 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
898 | JJAR = $(JDIR)/sigrok-core.jar | |
899 | ||
a9cb82ac DE |
900 | java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB) |
901 | ||
9fcf4d0b ML |
902 | java-build: $(JJAR) $(JLIB) |
903 | ||
dbde3b65 | 904 | $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 905 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) |
dbde3b65 | 906 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@ |
bd4fda24 | 907 | |
36e3f6a9 ML |
908 | $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \ |
909 | bindings/swig/templates.i bindings/swig/enums.i \ | |
fd31865e ML |
910 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
911 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
a9cb82ac | 912 | -$(AM_V_at)rm -f $(java_cleanfiles) |
8ebf1469 | 913 | $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \ |
4c9208a7 | 914 | -java -package org.sigrok.core.classes \ |
dbde3b65 DE |
915 | -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ |
916 | -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) | |
9fcf4d0b | 917 | |
90bd7656 | 918 | $(JJAR): $(JCXX) |
1f61c22f | 919 | $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC) |
f2a189f0 | 920 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 921 | |
fd31865e ML |
922 | $(JLIB): $(JCXX) \ |
923 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) \ | |
924 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
925 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 926 | @ORDER@ bindings/cxx/libsigrokcxx.la |
9d8f363d | 927 | $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) $(LDFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 | 928 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
9d8f363d | 929 | -lsigrokcxx $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) -o $(JLIB) |
9fcf4d0b ML |
930 | |
931 | java-install: | |
df705a7a | 932 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni |
8e0f9bf7 | 933 | $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni |
df705a7a | 934 | $(INSTALL) -d $(DESTDIR)$(datadir)/java |
8e0f9bf7 | 935 | $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java |
9fcf4d0b | 936 | |
7252a09e DE |
937 | java-uninstall: |
938 | -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar | |
939 | -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so | |
940 | ||
9fcf4d0b | 941 | java-clean: |
45ec8f77 | 942 | -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC) |
a9cb82ac | 943 | -$(AM_V_at)rm -fr $(JDIR)/doxy |
8a314e90 ML |
944 | |
945 | java-doc: | |
3535a6ee | 946 | $(AM_V_at)cd $(srcdir)/$(JDIR) && SRCDIR="$(abs_srcdir)/$(JDIR)/" BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile |
9fcf4d0b ML |
947 | |
948 | BUILD_EXTRA += java-build | |
949 | INSTALL_EXTRA += java-install | |
7252a09e | 950 | UNINSTALL_EXTRA += java-uninstall |
9fcf4d0b ML |
951 | CLEAN_EXTRA += java-clean |
952 | ||
953 | endif | |
954 | ||
f7740954 ML |
955 | all-local: $(BUILD_EXTRA) |
956 | install-exec-local: $(INSTALL_EXTRA) | |
09b2ca47 | 957 | uninstall-hook: $(UNINSTALL_EXTRA) |
d1785122 | 958 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 959 | |
37829c15 DE |
960 | .PHONY: dist-changelog |
961 | ||
962 | dist-hook: dist-changelog | |
963 | ||
964 | dist-changelog: | |
965 | $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \ | |
966 | cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \ | |
967 | elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \ | |
968 | mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ | |
969 | else \ | |
970 | rm -f .ChangeLog.tmp; exit 1; \ | |
971 | fi | |
0fc12d66 | 972 |