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