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