]> sigrok.org Git - libsigrok.git/blame - Makefile.am
Add RL64 and RL64S endianness helper macros
[libsigrok.git] / Makefile.am
CommitLineData
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 21ACLOCAL_AMFLAGS = -I m4
ba1c29dc 22AM_LIBTOOLFLAGS = --silent
bcc3694f 23GNUMAKEFLAGS = --no-print-directory
ba1c29dc 24
9448951d
DE
25# distutils/setuptools cause trouble on distcheck. Disable for now.
26DISTCHECK_CONFIGURE_FLAGS = --disable-python
27
ba1c29dc 28FIRMWARE_DIR = $(datadir)/sigrok-firmware
826938d8 29
9ac018d0 30local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I.
1f61c22f 31if BINDINGS_CXX
4cf2f34f 32local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx
1f61c22f 33endif
655b116c
DE
34# Do not hard-code the firmware location on Windows.
35if WIN32
36global_defs =
37else
38global_defs = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
39endif
1f61c22f 40# Ensure that local include directories are always searched first.
655b116c 41AM_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 45AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS)
4cf2f34f 46AM_CXXFLAGS = $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)
1f61c22f 47
8a7b47cd 48lib_LTLIBRARIES = libsigrok.la
a1bb33af 49
67bd8055 50# Backend files
a695d6c0 51libsigrok_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 \
57 src/drivers.c \
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 \
68 src/std.c
960a75e4 69
155b680d
BV
70# Input modules
71libsigrok_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 \
7db06394 77 src/input/vcd.c \
155b680d 78 src/input/wav.c
67bd8055 79
155b680d
BV
80# Output modules
81libsigrok_la_SOURCES += \
82 src/output/output.c \
83 src/output/analog.c \
84 src/output/ascii.c \
85 src/output/bits.c \
86 src/output/binary.c \
87 src/output/csv.c \
88 src/output/chronovu_la8.c \
afaa75b9 89 src/output/wav.c \
155b680d
BV
90 src/output/gnuplot.c \
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
97libsigrok_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 104libsigrok_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
109if NEED_RPC
110libsigrok_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
115endif
116if NEED_SERIAL
117libsigrok_la_SOURCES += \
155b680d
BV
118 src/serial.c \
119 src/scpi/scpi_serial.c
67bd8055
UH
120endif
121if NEED_USB
122libsigrok_la_SOURCES += \
155b680d
BV
123 src/ezusb.c \
124 src/usb.c \
125 src/scpi/scpi_usbtmc_libusb.c
67bd8055
UH
126endif
127if NEED_VISA
128libsigrok_la_SOURCES += \
155b680d 129 src/scpi/scpi_visa.c
67bd8055 130endif
bb2a4ed4
ML
131if NEED_GPIB
132libsigrok_la_SOURCES += \
7343ad1e 133 src/scpi/scpi_libgpib.c
bb2a4ed4 134endif
67bd8055 135
f54ebe0c 136# Modbus support
daa39012
AJ
137libsigrok_la_SOURCES += \
138 src/modbus/modbus.c
4c938fc2
AJ
139if NEED_SERIAL
140libsigrok_la_SOURCES += \
141 src/modbus/modbus_serial_rtu.c
142endif
daa39012 143
155b680d
BV
144# Hardware (DMM chip parsers)
145libsigrok_la_SOURCES += \
146 src/dmm/es519xx.c \
147 src/dmm/fs9721.c \
148 src/dmm/fs9922.c \
149 src/dmm/m2110.c \
150 src/dmm/metex14.c \
a24c3f4a 151 src/dmm/rs9lcd.c \
626027df 152 src/dmm/bm25x.c \
f3cde309 153 src/dmm/ut71x.c \
c36f78f7 154 src/dmm/ut372.c \
eed3dec8
MG
155 src/dmm/vc870.c \
156 src/dmm/dtm0660.c
67bd8055 157
6bcb3ee8 158# Hardware (LCR chip parsers)
d378f100 159if NEED_SERIAL
6bcb3ee8
JH
160libsigrok_la_SOURCES += \
161 src/lcr/es51919.c
d378f100 162endif
6bcb3ee8 163
e5d953b5
UH
164# Hardware (Scale protocol parsers)
165libsigrok_la_SOURCES += \
166 src/scale/kern.c
167
67bd8055
UH
168# Hardware drivers
169if HW_AGILENT_DMM
170libsigrok_la_SOURCES += \
155b680d
BV
171 src/hardware/agilent-dmm/api.c \
172 src/hardware/agilent-dmm/agilent-dmm.h \
173 src/hardware/agilent-dmm/sched.c
67bd8055 174endif
67bd8055
UH
175if HW_APPA_55II
176libsigrok_la_SOURCES += \
155b680d
BV
177 src/hardware/appa-55ii/protocol.h \
178 src/hardware/appa-55ii/protocol.c \
179 src/hardware/appa-55ii/api.c
67bd8055
UH
180endif
181if HW_ASIX_SIGMA
182libsigrok_la_SOURCES += \
3ba56876 183 src/hardware/asix-sigma/protocol.h \
184 src/hardware/asix-sigma/protocol.c \
185 src/hardware/asix-sigma/api.c
67bd8055
UH
186endif
187if HW_ATTEN_PPS3XXX
188libsigrok_la_SOURCES += \
155b680d
BV
189 src/hardware/atten-pps3xxx/protocol.h \
190 src/hardware/atten-pps3xxx/protocol.c \
191 src/hardware/atten-pps3xxx/api.c
67bd8055 192endif
dfaee1de
BG
193if HW_BAYLIBRE_ACME
194libsigrok_la_SOURCES += \
195 src/hardware/baylibre-acme/protocol.h \
196 src/hardware/baylibre-acme/protocol.c \
289eebd7
BG
197 src/hardware/baylibre-acme/api.c \
198 src/hardware/baylibre-acme/gpio.h \
199 src/hardware/baylibre-acme/gpio.c
dfaee1de 200endif
bb993797
KA
201if HW_BEAGLELOGIC
202libsigrok_la_SOURCES += \
3db4b08b 203 src/hardware/beaglelogic/beaglelogic.h \
155b680d
BV
204 src/hardware/beaglelogic/protocol.h \
205 src/hardware/beaglelogic/protocol.c \
206 src/hardware/beaglelogic/api.c
bb993797 207endif
67bd8055
UH
208if HW_BRYMEN_BM86X
209libsigrok_la_SOURCES += \
155b680d
BV
210 src/hardware/brymen-bm86x/protocol.h \
211 src/hardware/brymen-bm86x/protocol.c \
212 src/hardware/brymen-bm86x/api.c
67bd8055
UH
213endif
214if HW_BRYMEN_DMM
215libsigrok_la_SOURCES += \
155b680d
BV
216 src/hardware/brymen-dmm/parser.c \
217 src/hardware/brymen-dmm/protocol.h \
218 src/hardware/brymen-dmm/protocol.c \
219 src/hardware/brymen-dmm/api.c
67bd8055
UH
220endif
221if HW_CEM_DT_885X
222libsigrok_la_SOURCES += \
155b680d
BV
223 src/hardware/cem-dt-885x/protocol.h \
224 src/hardware/cem-dt-885x/protocol.c \
225 src/hardware/cem-dt-885x/api.c
67bd8055
UH
226endif
227if HW_CENTER_3XX
228libsigrok_la_SOURCES += \
155b680d
BV
229 src/hardware/center-3xx/protocol.h \
230 src/hardware/center-3xx/protocol.c \
231 src/hardware/center-3xx/api.c
67bd8055 232endif
7b356712 233if HW_CHRONOVU_LA
67bd8055 234libsigrok_la_SOURCES += \
155b680d
BV
235 src/hardware/chronovu-la/protocol.h \
236 src/hardware/chronovu-la/protocol.c \
237 src/hardware/chronovu-la/api.c
67bd8055
UH
238endif
239if HW_COLEAD_SLM
240libsigrok_la_SOURCES += \
155b680d
BV
241 src/hardware/colead-slm/protocol.h \
242 src/hardware/colead-slm/protocol.c \
243 src/hardware/colead-slm/api.c
67bd8055
UH
244endif
245if HW_CONRAD_DIGI_35_CPU
246libsigrok_la_SOURCES += \
155b680d
BV
247 src/hardware/conrad-digi-35-cpu/protocol.h \
248 src/hardware/conrad-digi-35-cpu/protocol.c \
249 src/hardware/conrad-digi-35-cpu/api.c
67bd8055
UH
250endif
251if HW_DEMO
252libsigrok_la_SOURCES += \
155b680d 253 src/hardware/demo/demo.c
67bd8055 254endif
b5089195
JH
255if HW_DEREE_DE5000
256libsigrok_la_SOURCES += \
257 src/hardware/deree-de5000/api.c
258endif
67bd8055
UH
259if HW_FLUKE_DMM
260libsigrok_la_SOURCES += \
155b680d
BV
261 src/hardware/fluke-dmm/fluke-dmm.h \
262 src/hardware/fluke-dmm/fluke.c \
263 src/hardware/fluke-dmm/api.c
67bd8055
UH
264endif
265if HW_FX2LAFW
266libsigrok_la_SOURCES += \
155b680d
BV
267 src/hardware/fx2lafw/protocol.h \
268 src/hardware/fx2lafw/protocol.c \
a7d7f93c 269 src/hardware/fx2lafw/api.c \
b9d53092
BV
270 src/hardware/fx2lafw/dslogic.c \
271 src/hardware/fx2lafw/dslogic.h
67bd8055
UH
272endif
273if HW_GMC_MH_1X_2X
274libsigrok_la_SOURCES += \
155b680d
BV
275 src/hardware/gmc-mh-1x-2x/protocol.h \
276 src/hardware/gmc-mh-1x-2x/protocol.c \
277 src/hardware/gmc-mh-1x-2x/api.c
67bd8055 278endif
7c198f96
ML
279if HW_GWINSTEK_GDS_800
280libsigrok_la_SOURCES += \
281 src/hardware/gwinstek-gds-800/protocol.h \
282 src/hardware/gwinstek-gds-800/protocol.c \
283 src/hardware/gwinstek-gds-800/api.c
284endif
67bd8055
UH
285if HW_HAMEG_HMO
286libsigrok_la_SOURCES += \
155b680d
BV
287 src/hardware/hameg-hmo/protocol.h \
288 src/hardware/hameg-hmo/protocol.c \
289 src/hardware/hameg-hmo/api.c
67bd8055
UH
290endif
291if HW_HANTEK_DSO
292libsigrok_la_SOURCES += \
155b680d
BV
293 src/hardware/hantek-dso/dso.h \
294 src/hardware/hantek-dso/dso.c \
295 src/hardware/hantek-dso/api.c
67bd8055 296endif
05ac4a98
DG
297if HW_HUNG_CHANG_DSO_2100
298libsigrok_la_SOURCES += \
299 src/hardware/hung-chang-dso-2100/protocol.h \
300 src/hardware/hung-chang-dso-2100/protocol.c \
301 src/hardware/hung-chang-dso-2100/api.c
302endif
67bd8055
UH
303if HW_IKALOGIC_SCANALOGIC2
304libsigrok_la_SOURCES += \
155b680d
BV
305 src/hardware/ikalogic-scanalogic2/protocol.h \
306 src/hardware/ikalogic-scanalogic2/protocol.c \
307 src/hardware/ikalogic-scanalogic2/api.c
67bd8055
UH
308endif
309if HW_IKALOGIC_SCANAPLUS
310libsigrok_la_SOURCES += \
155b680d
BV
311 src/hardware/ikalogic-scanaplus/protocol.h \
312 src/hardware/ikalogic-scanaplus/protocol.c \
313 src/hardware/ikalogic-scanaplus/api.c
67bd8055
UH
314endif
315if HW_KECHENG_KC_330B
316libsigrok_la_SOURCES += \
155b680d
BV
317 src/hardware/kecheng-kc-330b/protocol.h \
318 src/hardware/kecheng-kc-330b/protocol.c \
319 src/hardware/kecheng-kc-330b/api.c
67bd8055 320endif
9380ec2f
UH
321if HW_KERN_SCALE
322libsigrok_la_SOURCES += \
323 src/hardware/kern-scale/protocol.h \
324 src/hardware/kern-scale/protocol.c \
325 src/hardware/kern-scale/api.c
326endif
16fc7ee2 327if HW_KORAD_KAXXXXP
e75ee7de 328libsigrok_la_SOURCES += \
16fc7ee2
UH
329 src/hardware/korad-kaxxxxp/protocol.h \
330 src/hardware/korad-kaxxxxp/protocol.c \
331 src/hardware/korad-kaxxxxp/api.c
e75ee7de 332endif
67bd8055
UH
333if HW_LASCAR_EL_USB
334libsigrok_la_SOURCES += \
155b680d
BV
335 src/hardware/lascar-el-usb/protocol.h \
336 src/hardware/lascar-el-usb/protocol.c \
337 src/hardware/lascar-el-usb/api.c
67bd8055 338endif
c7b17bcb
TS
339if HW_LECROY_LOGICSTUDIO
340libsigrok_la_SOURCES += \
341 src/hardware/lecroy-logicstudio/protocol.h \
342 src/hardware/lecroy-logicstudio/protocol.c \
343 src/hardware/lecroy-logicstudio/api.c
344endif
8f4e922f
UH
345if HW_MANSON_HCS_3XXX
346libsigrok_la_SOURCES += \
155b680d
BV
347 src/hardware/manson-hcs-3xxx/protocol.h \
348 src/hardware/manson-hcs-3xxx/protocol.c \
349 src/hardware/manson-hcs-3xxx/api.c
8f4e922f 350endif
e1ccfb19
AJ
351if HW_MAYNUO_M97
352libsigrok_la_SOURCES += \
353 src/hardware/maynuo-m97/protocol.h \
354 src/hardware/maynuo-m97/protocol.c \
355 src/hardware/maynuo-m97/api.c
356endif
67bd8055
UH
357if HW_MIC_985XX
358libsigrok_la_SOURCES += \
155b680d
BV
359 src/hardware/mic-985xx/protocol.h \
360 src/hardware/mic-985xx/protocol.c \
361 src/hardware/mic-985xx/api.c
67bd8055 362endif
41b7bd01
MH
363if HW_MOTECH_LPS_30X
364libsigrok_la_SOURCES += \
155b680d
BV
365 src/hardware/motech-lps-30x/protocol.h \
366 src/hardware/motech-lps-30x/protocol.c \
367 src/hardware/motech-lps-30x/api.c
41b7bd01 368endif
67bd8055
UH
369if HW_NORMA_DMM
370libsigrok_la_SOURCES += \
155b680d
BV
371 src/hardware/norma-dmm/protocol.h \
372 src/hardware/norma-dmm/protocol.c \
373 src/hardware/norma-dmm/api.c
67bd8055 374endif
d4b38748 375if HW_OPENBENCH_LOGIC_SNIFFER
67bd8055 376libsigrok_la_SOURCES += \
155b680d
BV
377 src/hardware/openbench-logic-sniffer/protocol.h \
378 src/hardware/openbench-logic-sniffer/protocol.c \
379 src/hardware/openbench-logic-sniffer/api.c
67bd8055 380endif
4bd80e12 381if HW_PIPISTRELLO_OLS
382libsigrok_la_SOURCES += \
383 src/hardware/pipistrello-ols/protocol.h \
384 src/hardware/pipistrello-ols/protocol.c \
385 src/hardware/pipistrello-ols/api.c
386endif
67bd8055
UH
387if HW_RIGOL_DS
388libsigrok_la_SOURCES += \
155b680d
BV
389 src/hardware/rigol-ds/protocol.h \
390 src/hardware/rigol-ds/protocol.c \
391 src/hardware/rigol-ds/api.c
67bd8055
UH
392endif
393if HW_SALEAE_LOGIC16
394libsigrok_la_SOURCES += \
155b680d
BV
395 src/hardware/saleae-logic16/protocol.h \
396 src/hardware/saleae-logic16/protocol.c \
397 src/hardware/saleae-logic16/api.c
67bd8055 398endif
ca1a7cb5
BV
399if HW_SCPI_PPS
400libsigrok_la_SOURCES += \
401 src/hardware/scpi-pps/protocol.h \
402 src/hardware/scpi-pps/protocol.c \
d4eabea8 403 src/hardware/scpi-pps/profiles.c \
ca1a7cb5
BV
404 src/hardware/scpi-pps/api.c
405endif
67bd8055
UH
406if HW_SERIAL_DMM
407libsigrok_la_SOURCES += \
155b680d
BV
408 src/hardware/serial-dmm/protocol.h \
409 src/hardware/serial-dmm/protocol.c \
410 src/hardware/serial-dmm/api.c
67bd8055
UH
411endif
412if HW_SYSCLK_LWLA
413libsigrok_la_SOURCES += \
155b680d
BV
414 src/hardware/sysclk-lwla/lwla.h \
415 src/hardware/sysclk-lwla/lwla.c \
be64f90b
DE
416 src/hardware/sysclk-lwla/lwla1016.c \
417 src/hardware/sysclk-lwla/lwla1034.c \
155b680d
BV
418 src/hardware/sysclk-lwla/protocol.h \
419 src/hardware/sysclk-lwla/protocol.c \
420 src/hardware/sysclk-lwla/api.c
67bd8055
UH
421endif
422if HW_TELEINFO
423libsigrok_la_SOURCES += \
155b680d
BV
424 src/hardware/teleinfo/protocol.h \
425 src/hardware/teleinfo/protocol.c \
426 src/hardware/teleinfo/api.c
67bd8055 427endif
0acdd793
BV
428if HW_TESTO
429libsigrok_la_SOURCES += \
155b680d
BV
430 src/hardware/testo/protocol.h \
431 src/hardware/testo/protocol.c \
432 src/hardware/testo/api.c
0acdd793 433endif
67bd8055
UH
434if HW_TONDAJ_SL_814
435libsigrok_la_SOURCES += \
155b680d
BV
436 src/hardware/tondaj-sl-814/protocol.h \
437 src/hardware/tondaj-sl-814/protocol.c \
438 src/hardware/tondaj-sl-814/api.c
67bd8055
UH
439endif
440if HW_UNI_T_DMM
441libsigrok_la_SOURCES += \
155b680d
BV
442 src/hardware/uni-t-dmm/protocol.h \
443 src/hardware/uni-t-dmm/protocol.c \
444 src/hardware/uni-t-dmm/api.c
67bd8055
UH
445endif
446if HW_UNI_T_UT32X
447libsigrok_la_SOURCES += \
155b680d
BV
448 src/hardware/uni-t-ut32x/protocol.h \
449 src/hardware/uni-t-ut32x/protocol.c \
450 src/hardware/uni-t-ut32x/api.c
67bd8055
UH
451endif
452if HW_VICTOR_DMM
453libsigrok_la_SOURCES += \
155b680d
BV
454 src/hardware/victor-dmm/protocol.h \
455 src/hardware/victor-dmm/protocol.c \
456 src/hardware/victor-dmm/api.c
67bd8055 457endif
10763937
SA
458if HW_YOKOGAWA_DLM
459libsigrok_la_SOURCES += \
460 src/hardware/yokogawa-dlm/protocol.h \
461 src/hardware/yokogawa-dlm/protocol.c \
462 src/hardware/yokogawa-dlm/protocol_wrappers.h \
463 src/hardware/yokogawa-dlm/protocol_wrappers.c \
464 src/hardware/yokogawa-dlm/api.c
465endif
67bd8055
UH
466if HW_ZEROPLUS_LOGIC_CUBE
467libsigrok_la_SOURCES += \
155b680d
BV
468 src/hardware/zeroplus-logic-cube/analyzer.c \
469 src/hardware/zeroplus-logic-cube/analyzer.h \
470 src/hardware/zeroplus-logic-cube/gl_usb.h \
471 src/hardware/zeroplus-logic-cube/gl_usb.c \
472 src/hardware/zeroplus-logic-cube/protocol.h \
473 src/hardware/zeroplus-logic-cube/protocol.c \
474 src/hardware/zeroplus-logic-cube/api.c
67bd8055
UH
475endif
476
bc8ff24d 477libsigrok_la_LIBADD = $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS)
1f61c22f 478libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
ff101fca 479
45c59c8b 480library_includedir = $(includedir)/libsigrok
63d0fb75
ML
481library_include_HEADERS = \
482 include/libsigrok/libsigrok.h \
122322a9
DE
483 include/libsigrok/proto.h
484nodist_library_include_HEADERS = \
63d0fb75 485 include/libsigrok/version.h
155b680d 486noinst_HEADERS = src/libsigrok-internal.h
a1bb33af 487
8a7b47cd
UH
488pkgconfigdir = $(libdir)/pkgconfig
489pkgconfig_DATA = libsigrok.pc
d658e348 490
67bd8055
UH
491EXTRA_DIST = \
492 Doxyfile \
493 HACKING \
494 README.devices \
31ac7735
DE
495 bindings/cxx/ConfigKey_methods.cpp \
496 bindings/cxx/ConfigKey_methods.hpp \
497 bindings/cxx/ConfigKey_methods.i \
498 bindings/cxx/Doxyfile \
499 bindings/cxx/QuantityFlag_methods.cpp \
500 bindings/cxx/QuantityFlag_methods.hpp \
501 bindings/cxx/enums.py \
502 bindings/python/Doxyfile \
503 bindings/python/setup.py \
504 bindings/python/sigrok/__init__.py \
505 bindings/python/sigrok/core/__init__.py \
506 bindings/python/sigrok/core/classes.i \
507 bindings/java/Doxyfile \
508 bindings/java/org/sigrok/core/classes/classes.i \
509 bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \
510 bindings/java/org/sigrok/core/interfaces/LogCallback.java \
31ac7735
DE
511 bindings/swig/classes.i \
512 bindings/swig/doc.py \
0a9d05dc 513 bindings/swig/templates.i \
67bd8055
UH
514 contrib/gnuplot_chronovu_la8.gpi \
515 contrib/gnuplot_rigol_ds1xx2.gpi \
516 contrib/gnuplot_usbeesx.gpi \
517 contrib/gnuplot_usbeedx8.gpi \
518 contrib/gnuplot_usbeedx16.gpi \
519 contrib/sigrok-logo-notext.png \
520 contrib/z60_libsigrok.rules
521
522if HAVE_CHECK
02a2bf68 523TESTS = tests/main
67bd8055 524check_PROGRAMS = ${TESTS}
65489c1a 525endif
67bd8055 526
02a2bf68 527tests_main_SOURCES = \
6592c369 528 include/libsigrok/libsigrok.h \
67bd8055
UH
529 tests/lib.c \
530 tests/lib.h \
02a2bf68
UH
531 tests/main.c \
532 tests/core.c \
533 tests/input_all.c \
534 tests/input_binary.c \
535 tests/output_all.c \
536 tests/transform_all.c \
537 tests/session.c \
538 tests/strutil.c \
539 tests/version.c \
540 tests/driver_all.c \
541 tests/device.c \
6b71bf1b
UH
542 tests/trigger.c \
543 tests/analog.c
02a2bf68 544
65489c1a 545tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS)
dd8b5f56 546
580ed400
ML
547BUILD_EXTRA =
548INSTALL_EXTRA =
7252a09e 549UNINSTALL_EXTRA =
580ed400
ML
550CLEAN_EXTRA =
551
c23c8659
ML
552if BINDINGS_CXX
553
52ff4f6a 554lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
c23c8659 555
52ff4f6a 556bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
c23c8659 557
bc8ff24d 558bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS)
1f61c22f 559bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
fc8f82e9 560
0959ed3d
UH
561bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
562bindings_cxx_libsigrokcxx_la_include_HEADERS = \
122322a9
DE
563 bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
564nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \
161dc24d 565 bindings/cxx/include/libsigrokcxx/enums.hpp
c23c8659 566
52ff4f6a 567pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
c23c8659 568
3532ed01 569doxy/xml/index.xml: include/libsigrok/libsigrok.h
7f82ec4d 570 $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
580ed400 571
cf5b338e 572bindings/swig/enums.i: bindings/cxx/enums.timestamp
580ed400 573bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
161dc24d 574bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
c23c8659 575
b595a458 576bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
c23c8659 577 bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
b595a458 578 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
f2a189f0 579 $(AM_V_at)touch $@
c23c8659 580
580ed400 581bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
cf5b338e 582 $(library_include_HEADERS) $(nodist_library_include_HEADERS)
c23c8659 583
580ed400 584cxx-clean:
3532ed01 585 rm -rf doxy/
bd4fda24 586 rm -rf bindings/cxx/doxy/
45ec8f77 587 rm -f bindings/swig/enums.i
580ed400 588 rm -f bindings/cxx/enums.cpp
161dc24d 589 rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
580ed400 590 rm -f bindings/cxx/enums.timestamp
c23c8659 591
580ed400
ML
592CLEAN_EXTRA += cxx-clean
593
594endif
f7740954 595
bd4fda24
ML
596CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
597
161dc24d 598$(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
bd4fda24 599 bindings/cxx/enums.timestamp
33c84e81 600 $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
bd4fda24 601
8ebf1469
DE
602# Macro definitions to be used by the SWIG parser.
603swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS=
604
f7740954
ML
605if BINDINGS_PYTHON
606
d1785122 607PDIR = bindings/python
df979d6d
ML
608PDOC_START = bindings/python/sigrok/core/doc_start.i
609PDOC_END = bindings/python/sigrok/core/doc_end.i
bd4fda24 610
5dd538de 611setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' CXXFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' LDADD='$(PYSIGROK_LIBS)'
c05a0ba5
DE
612setup_quiet = --quiet
613setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet)
a9cb82ac 614
df979d6d 615$(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 616 $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
df979d6d
ML
617 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@
618
619$(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
620 $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
621 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@
d1785122
ML
622
623python-build: $(PDIR)/timestamp
624
fd31865e 625$(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \
36e3f6a9
ML
626 bindings/swig/classes.i bindings/swig/templates.i \
627 bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \
628 $(library_include_HEADERS) \
df979d6d 629 $(nodist_library_include_HEADERS) \
fd31865e
ML
630 $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
631 $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \
ba3070ff 632 @ORDER@ bindings/cxx/libsigrokcxx.la
a9cb82ac 633 $(AM_V_at)$(setup_py) clean --all 2>/dev/null
8ebf1469 634 $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py
a9cb82ac 635 $(AM_V_at): >$@
f7740954 636
a9cb82ac
DE
637python-install:
638 $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)"
452986be
DE
639 destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \
640 --prefix "$(prefix)" --exec-prefix "$(exec_prefix)"
f7740954 641
c26162ff 642python-clean:
a9cb82ac
DE
643 -$(AM_V_at)rm -f $(PDIR)/timestamp
644 -$(AM_V_at)rm -fr $(PDIR)/doxy
c05a0ba5 645 -$(AM_V_at)$(setup_py) clean --all 2>/dev/null
6a8c1d68
ML
646
647python-doc:
a9cb82ac 648 $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null
f7740954
ML
649
650BUILD_EXTRA += python-build
651INSTALL_EXTRA += python-install
652CLEAN_EXTRA += python-clean
653
654endif
655
9fcf4d0b
ML
656if BINDINGS_JAVA
657
658JDIR = bindings/java
90bd7656
ML
659JPKG = org/sigrok/core
660JCLS = $(JDIR)/$(JPKG)/classes
661JINT = $(JDIR)/$(JPKG)/interfaces
33c84e81 662JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
90bd7656 663JSWG = $(JCLS)/classes.i
bd4fda24 664JDOC = $(JCLS)/doc.i
90bd7656 665JCXX = $(JCLS)/classes_wrap.cxx
9fcf4d0b
ML
666JLIB = $(JDIR)/libsigrok_java_core_classes.so
667JJAR = $(JDIR)/sigrok-core.jar
668
a9cb82ac
DE
669java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB)
670
9fcf4d0b
ML
671java-build: $(JJAR) $(JLIB)
672
dbde3b65 673$(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 674 $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
dbde3b65 675 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@
bd4fda24 676
36e3f6a9
ML
677$(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \
678 bindings/swig/templates.i bindings/swig/enums.i \
fd31865e
ML
679 $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
680 $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS)
a9cb82ac 681 -$(AM_V_at)rm -f $(java_cleanfiles)
8ebf1469 682 $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \
4c9208a7 683 -java -package org.sigrok.core.classes \
dbde3b65
DE
684 -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \
685 -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG)
9fcf4d0b 686
90bd7656 687$(JJAR): $(JCXX)
1f61c22f 688 $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC)
f2a189f0 689 $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
9fcf4d0b 690
fd31865e
ML
691$(JLIB): $(JCXX) \
692 $(library_include_HEADERS) $(nodist_library_include_HEADERS) \
693 $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
694 $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \
ba3070ff 695 @ORDER@ bindings/cxx/libsigrokcxx.la
1f61c22f 696 $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) -L.libs -Lbindings/cxx/.libs \
90bd7656 697 -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
1f61c22f 698 -lsigrokcxx $(LIBSIGROKCXX_LIBS) -o $(JLIB)
9fcf4d0b
ML
699
700java-install:
df705a7a 701 $(INSTALL) -d $(DESTDIR)$(libdir)/jni
8e0f9bf7 702 $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni
df705a7a 703 $(INSTALL) -d $(DESTDIR)$(datadir)/java
8e0f9bf7 704 $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java
9fcf4d0b 705
7252a09e
DE
706java-uninstall:
707 -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar
708 -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so
709
9fcf4d0b 710java-clean:
45ec8f77 711 -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC)
a9cb82ac 712 -$(AM_V_at)rm -fr $(JDIR)/doxy
8a314e90
ML
713
714java-doc:
a9cb82ac 715 $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile
9fcf4d0b
ML
716
717BUILD_EXTRA += java-build
718INSTALL_EXTRA += java-install
7252a09e 719UNINSTALL_EXTRA += java-uninstall
9fcf4d0b
ML
720CLEAN_EXTRA += java-clean
721
722endif
723
f7740954
ML
724all-local: $(BUILD_EXTRA)
725install-exec-local: $(INSTALL_EXTRA)
7252a09e 726uninstall-local: $(UNINSTALL_EXTRA)
d1785122 727clean-local: $(CLEAN_EXTRA)
f7740954 728
37829c15
DE
729.PHONY: dist-changelog
730
731dist-hook: dist-changelog
732
733dist-changelog:
734 $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \
735 cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \
736 elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \
737 mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
738 else \
739 rm -f .ChangeLog.tmp; exit 1; \
740 fi
0fc12d66 741