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