]> sigrok.org Git - libsigrok.git/blame - Makefile.am
Build: Fix typo that broke the driver enable options
[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
d8521c93 21ACLOCAL_AMFLAGS = -I autostuff
826938d8 22
9ac018d0 23local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I.
1f61c22f 24if BINDINGS_CXX
c1aae900 25local_includes += -Ibindings/cxx/include -I${srcdir}/bindings/cxx/include -Ibindings/cxx
1f61c22f
DE
26endif
27# Ensure that local include directories are always searched first.
c1aae900 28AM_CPPFLAGS = $(local_includes) -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
340f6e7a 29
1f61c22f
DE
30# The check CFLAGS are a superset of the libsigrok CFLAGS, and the
31# python bindings CFLAGS are a superset of the C++ bindings CFLAGS.
32AM_CFLAGS = $(CHECK_CFLAGS)
33AM_CXXFLAGS = $(PYSIGROK_CFLAGS)
34
8a7b47cd 35lib_LTLIBRARIES = libsigrok.la
a1bb33af 36
67bd8055 37# Backend files
a695d6c0 38libsigrok_la_SOURCES = \
155b680d
BV
39 src/backend.c \
40 src/device.c \
41 src/session.c \
42 src/session_file.c \
43 src/session_driver.c \
44 src/drivers.c \
45 src/hwdriver.c \
46 src/trigger.c \
47 src/soft-trigger.c \
fb019a0e 48 src/analog.c \
24287ea9 49 src/fallback.c \
155b680d
BV
50 src/strutil.c \
51 src/log.c \
52 src/version.c \
53 src/error.c \
54 src/std.c
960a75e4 55
155b680d
BV
56# Input modules
57libsigrok_la_SOURCES += \
155b680d 58 src/input/input.c \
b84cba4d 59 src/input/binary.c \
02e24c0c 60 src/input/chronovu_la8.c \
41d214f6 61 src/input/csv.c \
7db06394 62 src/input/vcd.c \
155b680d 63 src/input/wav.c
67bd8055 64
155b680d
BV
65# Output modules
66libsigrok_la_SOURCES += \
67 src/output/output.c \
68 src/output/analog.c \
69 src/output/ascii.c \
70 src/output/bits.c \
71 src/output/binary.c \
72 src/output/csv.c \
73 src/output/chronovu_la8.c \
afaa75b9 74 src/output/wav.c \
155b680d
BV
75 src/output/gnuplot.c \
76 src/output/hex.c \
77 src/output/ols.c \
3250d8c7 78 src/output/srzip.c \
155b680d 79 src/output/vcd.c
67bd8055 80
988357ca
UH
81# Transform modules
82libsigrok_la_SOURCES += \
39f1752e 83 src/transform/transform.c \
43caa466 84 src/transform/nop.c \
d74d30bb
UH
85 src/transform/scale.c \
86 src/transform/invert.c
988357ca 87
155b680d 88# SCPI support
67bd8055 89libsigrok_la_SOURCES += \
155b680d
BV
90 src/scpi/scpi.c \
91 src/scpi/scpi_tcp.c
67bd8055
UH
92if NEED_RPC
93libsigrok_la_SOURCES += \
155b680d
BV
94 src/scpi/scpi_vxi.c \
95 src/scpi/vxi_clnt.c \
96 src/scpi/vxi_xdr.c \
97 src/scpi/vxi.h
67bd8055
UH
98endif
99if NEED_SERIAL
100libsigrok_la_SOURCES += \
155b680d
BV
101 src/serial.c \
102 src/scpi/scpi_serial.c
67bd8055
UH
103endif
104if NEED_USB
105libsigrok_la_SOURCES += \
155b680d
BV
106 src/ezusb.c \
107 src/usb.c \
108 src/scpi/scpi_usbtmc_libusb.c
67bd8055
UH
109endif
110if NEED_VISA
111libsigrok_la_SOURCES += \
155b680d 112 src/scpi/scpi_visa.c
67bd8055 113endif
bb2a4ed4
ML
114if NEED_GPIB
115libsigrok_la_SOURCES += \
7343ad1e 116 src/scpi/scpi_libgpib.c
bb2a4ed4 117endif
67bd8055 118
f54ebe0c 119# Modbus support
daa39012
AJ
120libsigrok_la_SOURCES += \
121 src/modbus/modbus.c
4c938fc2
AJ
122if NEED_SERIAL
123libsigrok_la_SOURCES += \
124 src/modbus/modbus_serial_rtu.c
125endif
daa39012 126
155b680d
BV
127# Hardware (DMM chip parsers)
128libsigrok_la_SOURCES += \
129 src/dmm/es519xx.c \
130 src/dmm/fs9721.c \
131 src/dmm/fs9922.c \
132 src/dmm/m2110.c \
133 src/dmm/metex14.c \
a24c3f4a 134 src/dmm/rs9lcd.c \
626027df 135 src/dmm/bm25x.c \
f3cde309 136 src/dmm/ut71x.c \
c36f78f7
UH
137 src/dmm/ut372.c \
138 src/dmm/vc870.c
67bd8055 139
6bcb3ee8 140# Hardware (LCR chip parsers)
d378f100 141if NEED_SERIAL
6bcb3ee8
JH
142libsigrok_la_SOURCES += \
143 src/lcr/es51919.c
d378f100 144endif
6bcb3ee8 145
67bd8055
UH
146# Hardware drivers
147if HW_AGILENT_DMM
148libsigrok_la_SOURCES += \
155b680d
BV
149 src/hardware/agilent-dmm/api.c \
150 src/hardware/agilent-dmm/agilent-dmm.h \
151 src/hardware/agilent-dmm/sched.c
67bd8055 152endif
67bd8055
UH
153if HW_APPA_55II
154libsigrok_la_SOURCES += \
155b680d
BV
155 src/hardware/appa-55ii/protocol.h \
156 src/hardware/appa-55ii/protocol.c \
157 src/hardware/appa-55ii/api.c
67bd8055
UH
158endif
159if HW_ASIX_SIGMA
160libsigrok_la_SOURCES += \
155b680d
BV
161 src/hardware/asix-sigma/asix-sigma.h \
162 src/hardware/asix-sigma/asix-sigma.c
67bd8055
UH
163endif
164if HW_ATTEN_PPS3XXX
165libsigrok_la_SOURCES += \
155b680d
BV
166 src/hardware/atten-pps3xxx/protocol.h \
167 src/hardware/atten-pps3xxx/protocol.c \
168 src/hardware/atten-pps3xxx/api.c
67bd8055 169endif
dfaee1de
BG
170if HW_BAYLIBRE_ACME
171libsigrok_la_SOURCES += \
172 src/hardware/baylibre-acme/protocol.h \
173 src/hardware/baylibre-acme/protocol.c \
289eebd7
BG
174 src/hardware/baylibre-acme/api.c \
175 src/hardware/baylibre-acme/gpio.h \
176 src/hardware/baylibre-acme/gpio.c
dfaee1de 177endif
bb993797
KA
178if HW_BEAGLELOGIC
179libsigrok_la_SOURCES += \
3db4b08b 180 src/hardware/beaglelogic/beaglelogic.h \
155b680d
BV
181 src/hardware/beaglelogic/protocol.h \
182 src/hardware/beaglelogic/protocol.c \
183 src/hardware/beaglelogic/api.c
bb993797 184endif
67bd8055
UH
185if HW_BRYMEN_BM86X
186libsigrok_la_SOURCES += \
155b680d
BV
187 src/hardware/brymen-bm86x/protocol.h \
188 src/hardware/brymen-bm86x/protocol.c \
189 src/hardware/brymen-bm86x/api.c
67bd8055
UH
190endif
191if HW_BRYMEN_DMM
192libsigrok_la_SOURCES += \
155b680d
BV
193 src/hardware/brymen-dmm/parser.c \
194 src/hardware/brymen-dmm/protocol.h \
195 src/hardware/brymen-dmm/protocol.c \
196 src/hardware/brymen-dmm/api.c
67bd8055
UH
197endif
198if HW_CEM_DT_885X
199libsigrok_la_SOURCES += \
155b680d
BV
200 src/hardware/cem-dt-885x/protocol.h \
201 src/hardware/cem-dt-885x/protocol.c \
202 src/hardware/cem-dt-885x/api.c
67bd8055
UH
203endif
204if HW_CENTER_3XX
205libsigrok_la_SOURCES += \
155b680d
BV
206 src/hardware/center-3xx/protocol.h \
207 src/hardware/center-3xx/protocol.c \
208 src/hardware/center-3xx/api.c
67bd8055 209endif
7b356712 210if HW_CHRONOVU_LA
67bd8055 211libsigrok_la_SOURCES += \
155b680d
BV
212 src/hardware/chronovu-la/protocol.h \
213 src/hardware/chronovu-la/protocol.c \
214 src/hardware/chronovu-la/api.c
67bd8055
UH
215endif
216if HW_COLEAD_SLM
217libsigrok_la_SOURCES += \
155b680d
BV
218 src/hardware/colead-slm/protocol.h \
219 src/hardware/colead-slm/protocol.c \
220 src/hardware/colead-slm/api.c
67bd8055
UH
221endif
222if HW_CONRAD_DIGI_35_CPU
223libsigrok_la_SOURCES += \
155b680d
BV
224 src/hardware/conrad-digi-35-cpu/protocol.h \
225 src/hardware/conrad-digi-35-cpu/protocol.c \
226 src/hardware/conrad-digi-35-cpu/api.c
67bd8055
UH
227endif
228if HW_DEMO
229libsigrok_la_SOURCES += \
155b680d 230 src/hardware/demo/demo.c
67bd8055 231endif
b5089195
JH
232if HW_DEREE_DE5000
233libsigrok_la_SOURCES += \
234 src/hardware/deree-de5000/api.c
235endif
67bd8055
UH
236if HW_FLUKE_DMM
237libsigrok_la_SOURCES += \
155b680d
BV
238 src/hardware/fluke-dmm/fluke-dmm.h \
239 src/hardware/fluke-dmm/fluke.c \
240 src/hardware/fluke-dmm/api.c
67bd8055
UH
241endif
242if HW_FX2LAFW
243libsigrok_la_SOURCES += \
155b680d
BV
244 src/hardware/fx2lafw/protocol.h \
245 src/hardware/fx2lafw/protocol.c \
a7d7f93c 246 src/hardware/fx2lafw/api.c \
b9d53092
BV
247 src/hardware/fx2lafw/dslogic.c \
248 src/hardware/fx2lafw/dslogic.h
67bd8055
UH
249endif
250if HW_GMC_MH_1X_2X
251libsigrok_la_SOURCES += \
155b680d
BV
252 src/hardware/gmc-mh-1x-2x/protocol.h \
253 src/hardware/gmc-mh-1x-2x/protocol.c \
254 src/hardware/gmc-mh-1x-2x/api.c
67bd8055
UH
255endif
256if HW_HAMEG_HMO
257libsigrok_la_SOURCES += \
155b680d
BV
258 src/hardware/hameg-hmo/protocol.h \
259 src/hardware/hameg-hmo/protocol.c \
260 src/hardware/hameg-hmo/api.c
67bd8055
UH
261endif
262if HW_HANTEK_DSO
263libsigrok_la_SOURCES += \
155b680d
BV
264 src/hardware/hantek-dso/dso.h \
265 src/hardware/hantek-dso/dso.c \
266 src/hardware/hantek-dso/api.c
67bd8055
UH
267endif
268if HW_IKALOGIC_SCANALOGIC2
269libsigrok_la_SOURCES += \
155b680d
BV
270 src/hardware/ikalogic-scanalogic2/protocol.h \
271 src/hardware/ikalogic-scanalogic2/protocol.c \
272 src/hardware/ikalogic-scanalogic2/api.c
67bd8055
UH
273endif
274if HW_IKALOGIC_SCANAPLUS
275libsigrok_la_SOURCES += \
155b680d
BV
276 src/hardware/ikalogic-scanaplus/protocol.h \
277 src/hardware/ikalogic-scanaplus/protocol.c \
278 src/hardware/ikalogic-scanaplus/api.c
67bd8055
UH
279endif
280if HW_KECHENG_KC_330B
281libsigrok_la_SOURCES += \
155b680d
BV
282 src/hardware/kecheng-kc-330b/protocol.h \
283 src/hardware/kecheng-kc-330b/protocol.c \
284 src/hardware/kecheng-kc-330b/api.c
67bd8055
UH
285endif
286if HW_LASCAR_EL_USB
287libsigrok_la_SOURCES += \
155b680d
BV
288 src/hardware/lascar-el-usb/protocol.h \
289 src/hardware/lascar-el-usb/protocol.c \
290 src/hardware/lascar-el-usb/api.c
67bd8055 291endif
8f4e922f
UH
292if HW_MANSON_HCS_3XXX
293libsigrok_la_SOURCES += \
155b680d
BV
294 src/hardware/manson-hcs-3xxx/protocol.h \
295 src/hardware/manson-hcs-3xxx/protocol.c \
296 src/hardware/manson-hcs-3xxx/api.c
8f4e922f 297endif
e1ccfb19
AJ
298if HW_MAYNUO_M97
299libsigrok_la_SOURCES += \
300 src/hardware/maynuo-m97/protocol.h \
301 src/hardware/maynuo-m97/protocol.c \
302 src/hardware/maynuo-m97/api.c
303endif
67bd8055
UH
304if HW_MIC_985XX
305libsigrok_la_SOURCES += \
155b680d
BV
306 src/hardware/mic-985xx/protocol.h \
307 src/hardware/mic-985xx/protocol.c \
308 src/hardware/mic-985xx/api.c
67bd8055 309endif
41b7bd01
MH
310if HW_MOTECH_LPS_30X
311libsigrok_la_SOURCES += \
155b680d
BV
312 src/hardware/motech-lps-30x/protocol.h \
313 src/hardware/motech-lps-30x/protocol.c \
314 src/hardware/motech-lps-30x/api.c
41b7bd01 315endif
67bd8055
UH
316if HW_NORMA_DMM
317libsigrok_la_SOURCES += \
155b680d
BV
318 src/hardware/norma-dmm/protocol.h \
319 src/hardware/norma-dmm/protocol.c \
320 src/hardware/norma-dmm/api.c
67bd8055 321endif
d4b38748 322if HW_OPENBENCH_LOGIC_SNIFFER
67bd8055 323libsigrok_la_SOURCES += \
155b680d
BV
324 src/hardware/openbench-logic-sniffer/protocol.h \
325 src/hardware/openbench-logic-sniffer/protocol.c \
326 src/hardware/openbench-logic-sniffer/api.c
67bd8055 327endif
4bd80e12 328if HW_PIPISTRELLO_OLS
329libsigrok_la_SOURCES += \
330 src/hardware/pipistrello-ols/protocol.h \
331 src/hardware/pipistrello-ols/protocol.c \
332 src/hardware/pipistrello-ols/api.c
333endif
67bd8055
UH
334if HW_RIGOL_DS
335libsigrok_la_SOURCES += \
155b680d
BV
336 src/hardware/rigol-ds/protocol.h \
337 src/hardware/rigol-ds/protocol.c \
338 src/hardware/rigol-ds/api.c
67bd8055
UH
339endif
340if HW_SALEAE_LOGIC16
341libsigrok_la_SOURCES += \
155b680d
BV
342 src/hardware/saleae-logic16/protocol.h \
343 src/hardware/saleae-logic16/protocol.c \
344 src/hardware/saleae-logic16/api.c
67bd8055 345endif
ca1a7cb5
BV
346if HW_SCPI_PPS
347libsigrok_la_SOURCES += \
348 src/hardware/scpi-pps/protocol.h \
349 src/hardware/scpi-pps/protocol.c \
d4eabea8 350 src/hardware/scpi-pps/profiles.c \
ca1a7cb5
BV
351 src/hardware/scpi-pps/api.c
352endif
67bd8055
UH
353if HW_SERIAL_DMM
354libsigrok_la_SOURCES += \
155b680d
BV
355 src/hardware/serial-dmm/protocol.h \
356 src/hardware/serial-dmm/protocol.c \
357 src/hardware/serial-dmm/api.c
67bd8055
UH
358endif
359if HW_SYSCLK_LWLA
360libsigrok_la_SOURCES += \
155b680d
BV
361 src/hardware/sysclk-lwla/lwla.h \
362 src/hardware/sysclk-lwla/lwla.c \
363 src/hardware/sysclk-lwla/protocol.h \
364 src/hardware/sysclk-lwla/protocol.c \
365 src/hardware/sysclk-lwla/api.c
67bd8055
UH
366endif
367if HW_TELEINFO
368libsigrok_la_SOURCES += \
155b680d
BV
369 src/hardware/teleinfo/protocol.h \
370 src/hardware/teleinfo/protocol.c \
371 src/hardware/teleinfo/api.c
67bd8055 372endif
0acdd793
BV
373if HW_TESTO
374libsigrok_la_SOURCES += \
155b680d
BV
375 src/hardware/testo/protocol.h \
376 src/hardware/testo/protocol.c \
377 src/hardware/testo/api.c
0acdd793 378endif
67bd8055
UH
379if HW_TONDAJ_SL_814
380libsigrok_la_SOURCES += \
155b680d
BV
381 src/hardware/tondaj-sl-814/protocol.h \
382 src/hardware/tondaj-sl-814/protocol.c \
383 src/hardware/tondaj-sl-814/api.c
67bd8055
UH
384endif
385if HW_UNI_T_DMM
386libsigrok_la_SOURCES += \
155b680d
BV
387 src/hardware/uni-t-dmm/protocol.h \
388 src/hardware/uni-t-dmm/protocol.c \
389 src/hardware/uni-t-dmm/api.c
67bd8055
UH
390endif
391if HW_UNI_T_UT32X
392libsigrok_la_SOURCES += \
155b680d
BV
393 src/hardware/uni-t-ut32x/protocol.h \
394 src/hardware/uni-t-ut32x/protocol.c \
395 src/hardware/uni-t-ut32x/api.c
67bd8055
UH
396endif
397if HW_VICTOR_DMM
398libsigrok_la_SOURCES += \
155b680d
BV
399 src/hardware/victor-dmm/protocol.h \
400 src/hardware/victor-dmm/protocol.c \
401 src/hardware/victor-dmm/api.c
67bd8055 402endif
10763937
SA
403if HW_YOKOGAWA_DLM
404libsigrok_la_SOURCES += \
405 src/hardware/yokogawa-dlm/protocol.h \
406 src/hardware/yokogawa-dlm/protocol.c \
407 src/hardware/yokogawa-dlm/protocol_wrappers.h \
408 src/hardware/yokogawa-dlm/protocol_wrappers.c \
409 src/hardware/yokogawa-dlm/api.c
410endif
67bd8055
UH
411if HW_ZEROPLUS_LOGIC_CUBE
412libsigrok_la_SOURCES += \
155b680d
BV
413 src/hardware/zeroplus-logic-cube/analyzer.c \
414 src/hardware/zeroplus-logic-cube/analyzer.h \
415 src/hardware/zeroplus-logic-cube/gl_usb.h \
416 src/hardware/zeroplus-logic-cube/gl_usb.c \
417 src/hardware/zeroplus-logic-cube/protocol.h \
418 src/hardware/zeroplus-logic-cube/protocol.c \
419 src/hardware/zeroplus-logic-cube/api.c
67bd8055
UH
420endif
421
1f61c22f
DE
422libsigrok_la_LIBADD = $(LIBSIGROK_LIBS)
423libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
ff101fca 424
45c59c8b 425library_includedir = $(includedir)/libsigrok
63d0fb75
ML
426library_include_HEADERS = \
427 include/libsigrok/libsigrok.h \
122322a9
DE
428 include/libsigrok/proto.h
429nodist_library_include_HEADERS = \
63d0fb75 430 include/libsigrok/version.h
155b680d 431noinst_HEADERS = src/libsigrok-internal.h
a1bb33af 432
8a7b47cd
UH
433pkgconfigdir = $(libdir)/pkgconfig
434pkgconfig_DATA = libsigrok.pc
d658e348 435
67bd8055
UH
436EXTRA_DIST = \
437 Doxyfile \
438 HACKING \
439 README.devices \
31ac7735
DE
440 bindings/cxx/ConfigKey_methods.cpp \
441 bindings/cxx/ConfigKey_methods.hpp \
442 bindings/cxx/ConfigKey_methods.i \
443 bindings/cxx/Doxyfile \
444 bindings/cxx/QuantityFlag_methods.cpp \
445 bindings/cxx/QuantityFlag_methods.hpp \
446 bindings/cxx/enums.py \
447 bindings/python/Doxyfile \
448 bindings/python/setup.py \
449 bindings/python/sigrok/__init__.py \
450 bindings/python/sigrok/core/__init__.py \
451 bindings/python/sigrok/core/classes.i \
452 bindings/java/Doxyfile \
453 bindings/java/org/sigrok/core/classes/classes.i \
454 bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \
455 bindings/java/org/sigrok/core/interfaces/LogCallback.java \
456 bindings/java/org/sigrok/core/interfaces/SourceCallback.java \
457 bindings/swig/classes.i \
458 bindings/swig/doc.py \
67bd8055
UH
459 contrib/gnuplot_chronovu_la8.gpi \
460 contrib/gnuplot_rigol_ds1xx2.gpi \
461 contrib/gnuplot_usbeesx.gpi \
462 contrib/gnuplot_usbeedx8.gpi \
463 contrib/gnuplot_usbeedx16.gpi \
464 contrib/sigrok-logo-notext.png \
465 contrib/z60_libsigrok.rules
466
467if HAVE_CHECK
468
02a2bf68 469TESTS = tests/main
67bd8055
UH
470
471check_PROGRAMS = ${TESTS}
472
02a2bf68 473tests_main_SOURCES = \
6592c369 474 include/libsigrok/libsigrok.h \
67bd8055
UH
475 tests/lib.c \
476 tests/lib.h \
02a2bf68
UH
477 tests/main.c \
478 tests/core.c \
479 tests/input_all.c \
480 tests/input_binary.c \
481 tests/output_all.c \
482 tests/transform_all.c \
483 tests/session.c \
484 tests/strutil.c \
485 tests/version.c \
486 tests/driver_all.c \
487 tests/device.c \
488 tests/trigger.c
489
1f61c22f 490tests_main_LDADD = libsigrok.la $(CHECK_LIBS)
67bd8055
UH
491
492endif
dd8b5f56 493
580ed400
ML
494BUILD_EXTRA =
495INSTALL_EXTRA =
496CLEAN_EXTRA =
497
c23c8659
ML
498if BINDINGS_CXX
499
52ff4f6a 500lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
c23c8659 501
52ff4f6a 502bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
c23c8659 503
1f61c22f
DE
504bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(LIBSIGROKCXX_LIBS)
505bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
fc8f82e9 506
0959ed3d
UH
507bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
508bindings_cxx_libsigrokcxx_la_include_HEADERS = \
122322a9
DE
509 bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
510nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \
161dc24d 511 bindings/cxx/include/libsigrokcxx/enums.hpp
c23c8659 512
52ff4f6a 513pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
c23c8659 514
3532ed01 515doxy/xml/index.xml: include/libsigrok/libsigrok.h
7f82ec4d 516 $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
580ed400 517
cf5b338e 518bindings/swig/enums.i: bindings/cxx/enums.timestamp
580ed400 519bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
161dc24d 520bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
c23c8659 521
b595a458 522bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
c23c8659 523 bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
b595a458 524 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
f2a189f0 525 $(AM_V_at)touch $@
c23c8659 526
580ed400 527bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
cf5b338e 528 $(library_include_HEADERS) $(nodist_library_include_HEADERS)
c23c8659 529
580ed400 530cxx-clean:
3532ed01 531 rm -rf doxy/
bd4fda24 532 rm -rf bindings/cxx/doxy/
580ed400 533 rm -f bindings/cxx/enums.cpp
161dc24d 534 rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
580ed400 535 rm -f bindings/cxx/enums.timestamp
c23c8659 536
580ed400
ML
537CLEAN_EXTRA += cxx-clean
538
539endif
f7740954 540
bd4fda24
ML
541CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
542
161dc24d 543$(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
bd4fda24 544 bindings/cxx/enums.timestamp
33c84e81 545 $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
bd4fda24 546
f7740954
ML
547if BINDINGS_PYTHON
548
d1785122 549PDIR = bindings/python
bd4fda24
ML
550PDOC = bindings/python/sigrok/core/doc.i
551
552$(PDOC): bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 553 $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
da89e23a 554 $(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@
d1785122
ML
555
556python-build: $(PDIR)/timestamp
557
c26162ff 558python-quietclean:
da89e23a 559 $(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \
c26162ff 560 | grep -v "can.t clean it"; true
8eb10b62 561
52ff4f6a 562$(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \
cf5b338e
DE
563 bindings/swig/classes.i bindings/swig/enums.i $(PDOC) \
564 $(library_include_HEADERS) $(nodist_library_include_HEADERS)
c26162ff 565 $(AM_V_at)$(MAKE) python-quietclean
da89e23a 566 $(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \
c26162ff 567 | grep -v "command line option.*Wstrict-prototypes"; true
f2a189f0 568 $(AM_V_at)touch $(PDIR)/timestamp
f7740954 569
6ae53625
JP
570$(DESTDIR)$(prefix):
571 $(MKDIR_P) $@
572
573python-install: $(DESTDIR)$(prefix)
574 cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix) `test "$(DESTDIR)" && echo --root=$(DESTDIR)`
f7740954 575
c26162ff
BV
576python-clean:
577 $(AM_V_at)$(MAKE) python-quietclean
f2a189f0 578 $(AM_V_at)rm -f $(PDIR)/timestamp
6a8c1d68
ML
579 $(AM_V_at)rm -rf $(PDIR)/doxy/
580
581python-doc:
0e1a7fe9 582 $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR=$(abs_builddir)/$(PDIR)/ doxygen Doxyfile 2>/dev/null
f7740954
ML
583
584BUILD_EXTRA += python-build
585INSTALL_EXTRA += python-install
586CLEAN_EXTRA += python-clean
587
588endif
589
9fcf4d0b
ML
590if BINDINGS_JAVA
591
592JDIR = bindings/java
90bd7656
ML
593JPKG = org/sigrok/core
594JCLS = $(JDIR)/$(JPKG)/classes
595JINT = $(JDIR)/$(JPKG)/interfaces
33c84e81 596JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
90bd7656 597JSWG = $(JCLS)/classes.i
bd4fda24 598JDOC = $(JCLS)/doc.i
90bd7656 599JCXX = $(JCLS)/classes_wrap.cxx
9fcf4d0b
ML
600JLIB = $(JDIR)/libsigrok_java_core_classes.so
601JJAR = $(JDIR)/sigrok-core.jar
602
603java-build: $(JJAR) $(JLIB)
604
bd4fda24 605$(JDOC): bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 606 $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
33c84e81 607 $(AM_V_GEN)python $< java $(CPPXMLDOC) > $@
bd4fda24 608
cf5b338e
DE
609$(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i \
610 $(library_include_HEADERS) $(nodist_library_include_HEADERS)
f1830b22 611 $(AM_V_at)make java-clean
f2a189f0 612 $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \
1f61c22f 613 -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) -outdir $(JCLS) -o $@ $<
9fcf4d0b 614
90bd7656 615$(JJAR): $(JCXX)
1f61c22f 616 $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC)
f2a189f0 617 $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
9fcf4d0b 618
cf5b338e 619$(JLIB): $(JCXX) bindings/cxx/libsigrokcxx.la $(library_include_HEADERS) $(nodist_library_include_HEADERS)
1f61c22f 620 $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) -L.libs -Lbindings/cxx/.libs \
90bd7656 621 -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
1f61c22f 622 -lsigrokcxx $(LIBSIGROKCXX_LIBS) -o $(JLIB)
9fcf4d0b
ML
623
624java-install:
df705a7a
JP
625 $(INSTALL) -d $(DESTDIR)$(libdir)/jni
626 $(INSTALL) $(JLIB) -t $(DESTDIR)$(libdir)/jni
627 $(INSTALL) -d $(DESTDIR)$(datadir)/java
628 $(INSTALL) $(JJAR) -t $(DESTDIR)$(datadir)/java
9fcf4d0b
ML
629
630java-clean:
2fe07d3f
BV
631 $(AM_V_at)rm -f $(JCXX)
632 $(AM_V_at)rm -f $(JCLS)/*.java
633 $(AM_V_at)rm -f $(JCLS)/*.class
634 $(AM_V_at)rm -f $(JINT)/*.class
635 $(AM_V_at)rm -f $(JJAR)
636 $(AM_V_at)rm -f $(JLIB)
637 $(AM_V_at)rm -rf $(JDIR)/doxy/
8a314e90
ML
638
639java-doc:
33c84e81 640 $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR=$(abs_builddir)/$(JDIR)/ doxygen Doxyfile 2>/dev/null
9fcf4d0b
ML
641
642BUILD_EXTRA += java-build
643INSTALL_EXTRA += java-install
644CLEAN_EXTRA += java-clean
645
646endif
647
f7740954
ML
648all-local: $(BUILD_EXTRA)
649install-exec-local: $(INSTALL_EXTRA)
d1785122 650clean-local: $(CLEAN_EXTRA)
f7740954 651
c0958408 652MAINTAINERCLEANFILES = ChangeLog
0fc12d66
UH
653
654.PHONY: ChangeLog
655ChangeLog:
bd58d8f3 656 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
0fc12d66
UH
657
658dist-hook: ChangeLog
659