]>
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 | |
155b680d | 23 | AM_CPPFLAGS = -Isrc -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 \ | |
38 | src/strutil.c \ | |
39 | src/log.c \ | |
40 | src/version.c \ | |
41 | src/error.c \ | |
42 | src/std.c | |
960a75e4 | 43 | |
155b680d BV |
44 | # Input modules |
45 | libsigrok_la_SOURCES += \ | |
46 | src/input/binary.c \ | |
47 | src/input/chronovu_la8.c \ | |
48 | src/input/csv.c \ | |
49 | src/input/input.c \ | |
50 | src/input/vcd.c \ | |
51 | src/input/wav.c | |
67bd8055 | 52 | |
155b680d BV |
53 | # Output modules |
54 | libsigrok_la_SOURCES += \ | |
55 | src/output/output.c \ | |
56 | src/output/analog.c \ | |
57 | src/output/ascii.c \ | |
58 | src/output/bits.c \ | |
59 | src/output/binary.c \ | |
60 | src/output/csv.c \ | |
61 | src/output/chronovu_la8.c \ | |
62 | src/output/gnuplot.c \ | |
63 | src/output/hex.c \ | |
64 | src/output/ols.c \ | |
65 | src/output/vcd.c | |
67bd8055 | 66 | |
155b680d | 67 | # SCPI support |
67bd8055 | 68 | libsigrok_la_SOURCES += \ |
155b680d BV |
69 | src/scpi/scpi.c \ |
70 | src/scpi/scpi_tcp.c | |
67bd8055 UH |
71 | if NEED_RPC |
72 | libsigrok_la_SOURCES += \ | |
155b680d BV |
73 | src/scpi/scpi_vxi.c \ |
74 | src/scpi/vxi_clnt.c \ | |
75 | src/scpi/vxi_xdr.c \ | |
76 | src/scpi/vxi.h | |
67bd8055 UH |
77 | endif |
78 | if NEED_SERIAL | |
79 | libsigrok_la_SOURCES += \ | |
155b680d BV |
80 | src/serial.c \ |
81 | src/scpi/scpi_serial.c | |
67bd8055 UH |
82 | endif |
83 | if NEED_USB | |
84 | libsigrok_la_SOURCES += \ | |
155b680d BV |
85 | src/ezusb.c \ |
86 | src/usb.c \ | |
87 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
88 | endif |
89 | if NEED_VISA | |
90 | libsigrok_la_SOURCES += \ | |
155b680d | 91 | src/scpi/scpi_visa.c |
67bd8055 UH |
92 | endif |
93 | ||
155b680d BV |
94 | # Hardware (DMM chip parsers) |
95 | libsigrok_la_SOURCES += \ | |
96 | src/dmm/es519xx.c \ | |
97 | src/dmm/fs9721.c \ | |
98 | src/dmm/fs9922.c \ | |
99 | src/dmm/m2110.c \ | |
100 | src/dmm/metex14.c \ | |
101 | src/dmm/rs9lcd.c | |
67bd8055 UH |
102 | |
103 | # Hardware drivers | |
104 | if HW_AGILENT_DMM | |
105 | libsigrok_la_SOURCES += \ | |
155b680d BV |
106 | src/hardware/agilent-dmm/api.c \ |
107 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
108 | src/hardware/agilent-dmm/sched.c | |
67bd8055 | 109 | endif |
67bd8055 UH |
110 | if HW_APPA_55II |
111 | libsigrok_la_SOURCES += \ | |
155b680d BV |
112 | src/hardware/appa-55ii/protocol.h \ |
113 | src/hardware/appa-55ii/protocol.c \ | |
114 | src/hardware/appa-55ii/api.c | |
67bd8055 UH |
115 | endif |
116 | if HW_ASIX_SIGMA | |
117 | libsigrok_la_SOURCES += \ | |
155b680d BV |
118 | src/hardware/asix-sigma/asix-sigma.h \ |
119 | src/hardware/asix-sigma/asix-sigma.c | |
67bd8055 UH |
120 | endif |
121 | if HW_ATTEN_PPS3XXX | |
122 | libsigrok_la_SOURCES += \ | |
155b680d BV |
123 | src/hardware/atten-pps3xxx/protocol.h \ |
124 | src/hardware/atten-pps3xxx/protocol.c \ | |
125 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 126 | endif |
bb993797 KA |
127 | if HW_BEAGLELOGIC |
128 | libsigrok_la_SOURCES += \ | |
3db4b08b | 129 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
130 | src/hardware/beaglelogic/protocol.h \ |
131 | src/hardware/beaglelogic/protocol.c \ | |
132 | src/hardware/beaglelogic/api.c | |
bb993797 | 133 | endif |
67bd8055 UH |
134 | if HW_BRYMEN_BM86X |
135 | libsigrok_la_SOURCES += \ | |
155b680d BV |
136 | src/hardware/brymen-bm86x/protocol.h \ |
137 | src/hardware/brymen-bm86x/protocol.c \ | |
138 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
139 | endif |
140 | if HW_BRYMEN_DMM | |
141 | libsigrok_la_SOURCES += \ | |
155b680d BV |
142 | src/hardware/brymen-dmm/parser.c \ |
143 | src/hardware/brymen-dmm/protocol.h \ | |
144 | src/hardware/brymen-dmm/protocol.c \ | |
145 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
146 | endif |
147 | if HW_CEM_DT_885X | |
148 | libsigrok_la_SOURCES += \ | |
155b680d BV |
149 | src/hardware/cem-dt-885x/protocol.h \ |
150 | src/hardware/cem-dt-885x/protocol.c \ | |
151 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
152 | endif |
153 | if HW_CENTER_3XX | |
154 | libsigrok_la_SOURCES += \ | |
155b680d BV |
155 | src/hardware/center-3xx/protocol.h \ |
156 | src/hardware/center-3xx/protocol.c \ | |
157 | src/hardware/center-3xx/api.c | |
67bd8055 | 158 | endif |
7b356712 | 159 | if HW_CHRONOVU_LA |
67bd8055 | 160 | libsigrok_la_SOURCES += \ |
155b680d BV |
161 | src/hardware/chronovu-la/protocol.h \ |
162 | src/hardware/chronovu-la/protocol.c \ | |
163 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
164 | endif |
165 | if HW_COLEAD_SLM | |
166 | libsigrok_la_SOURCES += \ | |
155b680d BV |
167 | src/hardware/colead-slm/protocol.h \ |
168 | src/hardware/colead-slm/protocol.c \ | |
169 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
170 | endif |
171 | if HW_CONRAD_DIGI_35_CPU | |
172 | libsigrok_la_SOURCES += \ | |
155b680d BV |
173 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
174 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
175 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
176 | endif |
177 | if HW_DEMO | |
178 | libsigrok_la_SOURCES += \ | |
155b680d | 179 | src/hardware/demo/demo.c |
67bd8055 UH |
180 | endif |
181 | if HW_FLUKE_DMM | |
182 | libsigrok_la_SOURCES += \ | |
155b680d BV |
183 | src/hardware/fluke-dmm/fluke-dmm.h \ |
184 | src/hardware/fluke-dmm/fluke.c \ | |
185 | src/hardware/fluke-dmm/api.c | |
67bd8055 UH |
186 | endif |
187 | if HW_FX2LAFW | |
188 | libsigrok_la_SOURCES += \ | |
155b680d BV |
189 | src/hardware/fx2lafw/protocol.h \ |
190 | src/hardware/fx2lafw/protocol.c \ | |
191 | src/hardware/fx2lafw/api.c | |
67bd8055 UH |
192 | endif |
193 | if HW_GMC_MH_1X_2X | |
194 | libsigrok_la_SOURCES += \ | |
155b680d BV |
195 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
196 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
197 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 UH |
198 | endif |
199 | if HW_HAMEG_HMO | |
200 | libsigrok_la_SOURCES += \ | |
155b680d BV |
201 | src/hardware/hameg-hmo/protocol.h \ |
202 | src/hardware/hameg-hmo/protocol.c \ | |
203 | src/hardware/hameg-hmo/api.c | |
67bd8055 UH |
204 | endif |
205 | if HW_HANTEK_DSO | |
206 | libsigrok_la_SOURCES += \ | |
155b680d BV |
207 | src/hardware/hantek-dso/dso.h \ |
208 | src/hardware/hantek-dso/dso.c \ | |
209 | src/hardware/hantek-dso/api.c | |
67bd8055 UH |
210 | endif |
211 | if HW_IKALOGIC_SCANALOGIC2 | |
212 | libsigrok_la_SOURCES += \ | |
155b680d BV |
213 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
214 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
215 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
216 | endif |
217 | if HW_IKALOGIC_SCANAPLUS | |
218 | libsigrok_la_SOURCES += \ | |
155b680d BV |
219 | src/hardware/ikalogic-scanaplus/protocol.h \ |
220 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
221 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
222 | endif |
223 | if HW_KECHENG_KC_330B | |
224 | libsigrok_la_SOURCES += \ | |
155b680d BV |
225 | src/hardware/kecheng-kc-330b/protocol.h \ |
226 | src/hardware/kecheng-kc-330b/protocol.c \ | |
227 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 UH |
228 | endif |
229 | if HW_LASCAR_EL_USB | |
230 | libsigrok_la_SOURCES += \ | |
155b680d BV |
231 | src/hardware/lascar-el-usb/protocol.h \ |
232 | src/hardware/lascar-el-usb/protocol.c \ | |
233 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 234 | endif |
8f4e922f UH |
235 | if HW_MANSON_HCS_3XXX |
236 | libsigrok_la_SOURCES += \ | |
155b680d BV |
237 | src/hardware/manson-hcs-3xxx/protocol.h \ |
238 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
239 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 240 | endif |
67bd8055 UH |
241 | if HW_MIC_985XX |
242 | libsigrok_la_SOURCES += \ | |
155b680d BV |
243 | src/hardware/mic-985xx/protocol.h \ |
244 | src/hardware/mic-985xx/protocol.c \ | |
245 | src/hardware/mic-985xx/api.c | |
67bd8055 | 246 | endif |
41b7bd01 MH |
247 | if HW_MOTECH_LPS_30X |
248 | libsigrok_la_SOURCES += \ | |
155b680d BV |
249 | src/hardware/motech-lps-30x/protocol.h \ |
250 | src/hardware/motech-lps-30x/protocol.c \ | |
251 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 252 | endif |
67bd8055 UH |
253 | if HW_NORMA_DMM |
254 | libsigrok_la_SOURCES += \ | |
155b680d BV |
255 | src/hardware/norma-dmm/protocol.h \ |
256 | src/hardware/norma-dmm/protocol.c \ | |
257 | src/hardware/norma-dmm/api.c | |
67bd8055 | 258 | endif |
d4b38748 | 259 | if HW_OPENBENCH_LOGIC_SNIFFER |
67bd8055 | 260 | libsigrok_la_SOURCES += \ |
155b680d BV |
261 | src/hardware/openbench-logic-sniffer/protocol.h \ |
262 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
263 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 UH |
264 | endif |
265 | if HW_RIGOL_DS | |
266 | libsigrok_la_SOURCES += \ | |
155b680d BV |
267 | src/hardware/rigol-ds/protocol.h \ |
268 | src/hardware/rigol-ds/protocol.c \ | |
269 | src/hardware/rigol-ds/api.c | |
67bd8055 UH |
270 | endif |
271 | if HW_SALEAE_LOGIC16 | |
272 | libsigrok_la_SOURCES += \ | |
155b680d BV |
273 | src/hardware/saleae-logic16/protocol.h \ |
274 | src/hardware/saleae-logic16/protocol.c \ | |
275 | src/hardware/saleae-logic16/api.c | |
67bd8055 UH |
276 | endif |
277 | if HW_SERIAL_DMM | |
278 | libsigrok_la_SOURCES += \ | |
155b680d BV |
279 | src/hardware/serial-dmm/protocol.h \ |
280 | src/hardware/serial-dmm/protocol.c \ | |
281 | src/hardware/serial-dmm/api.c | |
67bd8055 UH |
282 | endif |
283 | if HW_SYSCLK_LWLA | |
284 | libsigrok_la_SOURCES += \ | |
155b680d BV |
285 | src/hardware/sysclk-lwla/lwla.h \ |
286 | src/hardware/sysclk-lwla/lwla.c \ | |
287 | src/hardware/sysclk-lwla/protocol.h \ | |
288 | src/hardware/sysclk-lwla/protocol.c \ | |
289 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
290 | endif |
291 | if HW_TELEINFO | |
292 | libsigrok_la_SOURCES += \ | |
155b680d BV |
293 | src/hardware/teleinfo/protocol.h \ |
294 | src/hardware/teleinfo/protocol.c \ | |
295 | src/hardware/teleinfo/api.c | |
67bd8055 | 296 | endif |
0acdd793 BV |
297 | if HW_TESTO |
298 | libsigrok_la_SOURCES += \ | |
155b680d BV |
299 | src/hardware/testo/protocol.h \ |
300 | src/hardware/testo/protocol.c \ | |
301 | src/hardware/testo/api.c | |
0acdd793 | 302 | endif |
67bd8055 UH |
303 | if HW_TONDAJ_SL_814 |
304 | libsigrok_la_SOURCES += \ | |
155b680d BV |
305 | src/hardware/tondaj-sl-814/protocol.h \ |
306 | src/hardware/tondaj-sl-814/protocol.c \ | |
307 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
308 | endif |
309 | if HW_UNI_T_DMM | |
310 | libsigrok_la_SOURCES += \ | |
155b680d BV |
311 | src/hardware/uni-t-dmm/protocol.h \ |
312 | src/hardware/uni-t-dmm/protocol.c \ | |
313 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
314 | endif |
315 | if HW_UNI_T_UT32X | |
316 | libsigrok_la_SOURCES += \ | |
155b680d BV |
317 | src/hardware/uni-t-ut32x/protocol.h \ |
318 | src/hardware/uni-t-ut32x/protocol.c \ | |
319 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
320 | endif |
321 | if HW_VICTOR_DMM | |
322 | libsigrok_la_SOURCES += \ | |
155b680d BV |
323 | src/hardware/victor-dmm/protocol.h \ |
324 | src/hardware/victor-dmm/protocol.c \ | |
325 | src/hardware/victor-dmm/api.c | |
67bd8055 UH |
326 | endif |
327 | if HW_ZEROPLUS_LOGIC_CUBE | |
328 | libsigrok_la_SOURCES += \ | |
155b680d BV |
329 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
330 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
331 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
332 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
333 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
334 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
335 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
336 | endif |
337 | ||
338 | libsigrok_la_LIBADD = $(LIBOBJS) | |
a1bb33af | 339 | |
6dddd902 | 340 | libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS) |
eeebceea | 341 | |
45c59c8b | 342 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
343 | library_include_HEADERS = \ |
344 | include/libsigrok/libsigrok.h \ | |
345 | include/libsigrok/proto.h \ | |
346 | include/libsigrok/version.h | |
155b680d | 347 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 348 | |
8a7b47cd UH |
349 | pkgconfigdir = $(libdir)/pkgconfig |
350 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 351 | |
67bd8055 UH |
352 | EXTRA_DIST = \ |
353 | Doxyfile \ | |
354 | HACKING \ | |
355 | README.devices \ | |
356 | contrib/gnuplot_chronovu_la8.gpi \ | |
357 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
358 | contrib/gnuplot_usbeesx.gpi \ | |
359 | contrib/gnuplot_usbeedx8.gpi \ | |
360 | contrib/gnuplot_usbeedx16.gpi \ | |
361 | contrib/sigrok-logo-notext.png \ | |
362 | contrib/z60_libsigrok.rules | |
363 | ||
364 | if HAVE_CHECK | |
365 | ||
366 | TESTS = tests/check_main | |
367 | ||
368 | check_PROGRAMS = ${TESTS} | |
369 | ||
370 | tests_check_main_SOURCES = \ | |
6592c369 | 371 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
372 | tests/lib.c \ |
373 | tests/lib.h \ | |
374 | tests/check_main.c \ | |
375 | tests/check_core.c \ | |
376 | tests/check_input_all.c \ | |
377 | tests/check_input_binary.c \ | |
378 | tests/check_output_all.c \ | |
379 | tests/check_strutil.c \ | |
380 | tests/check_version.c \ | |
381 | tests/check_driver_all.c | |
382 | ||
383 | tests_check_main_CFLAGS = @check_CFLAGS@ | |
384 | ||
385 | tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@ | |
386 | ||
387 | endif | |
dd8b5f56 | 388 | |
580ed400 ML |
389 | BUILD_EXTRA = |
390 | INSTALL_EXTRA = | |
391 | CLEAN_EXTRA = | |
392 | ||
c23c8659 ML |
393 | if BINDINGS_CXX |
394 | ||
395 | lib_LTLIBRARIES += bindings/cxx/libsigrokxx.la | |
396 | ||
397 | bindings_cxx_libsigrokxx_la_SOURCES = bindings/cxx/classes.cpp | |
398 | ||
d1785122 | 399 | bindings_cxx_libsigrokxx_la_LIBADD = libsigrok.la $(glibmm_LIBS) |
c23c8659 ML |
400 | |
401 | bindings_cxx_libsigrokxx_la_LDFLAGS = $(SR_LIB_LDFLAGS) | |
402 | ||
403 | library_include_HEADERS += \ | |
404 | bindings/cxx/include/libsigrok/libsigrok.hpp \ | |
405 | bindings/cxx/include/libsigrok/enums.hpp | |
406 | ||
407 | pkgconfig_DATA += bindings/cxx/libsigrokxx.pc | |
408 | ||
580ed400 | 409 | bindings/cxx/libsigrok.xml: include/libsigrok/libsigrok.h |
f2a189f0 | 410 | $(AM_V_GEN)gccxml $(CFLAGS) -DGLIB_DISABLE_DEPRECATION_WARNINGS $< -fxml=$@ |
580ed400 ML |
411 | |
412 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp | |
413 | ||
414 | bindings/cxx/include/libsigrok/enums.hpp: bindings/cxx/enums.timestamp | |
c23c8659 | 415 | |
580ed400 | 416 | bindings/cxx/enums.timestamp: bindings/cxx/enums.py bindings/cxx/libsigrok.xml \ |
c23c8659 | 417 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
f2a189f0 BV |
418 | $(AM_V_GEN)python $< |
419 | $(AM_V_at)touch $@ | |
c23c8659 | 420 | |
580ed400 ML |
421 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
422 | $(library_include_HEADERS) | |
c23c8659 | 423 | |
580ed400 ML |
424 | cxx-clean: |
425 | rm -f bindings/cxx/libsigrok.xml | |
426 | rm -f bindings/cxx/enums.cpp | |
427 | rm -f bindings/cxx/include/libsigrok/enums.hpp | |
428 | rm -f bindings/cxx/enums.timestamp | |
c23c8659 | 429 | |
580ed400 ML |
430 | CLEAN_EXTRA += cxx-clean |
431 | ||
432 | endif | |
f7740954 ML |
433 | |
434 | if BINDINGS_PYTHON | |
435 | ||
d1785122 ML |
436 | PDIR = bindings/python |
437 | ||
438 | python-build: $(PDIR)/timestamp | |
439 | ||
c26162ff BV |
440 | python-quietclean: |
441 | $(AM_V_at)python $(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \ | |
442 | | grep -v "can.t clean it"; true | |
8eb10b62 | 443 | |
580ed400 | 444 | $(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i \ |
c26162ff BV |
445 | $(library_include_HEADERS) |
446 | $(AM_V_at)$(MAKE) python-quietclean | |
447 | $(AM_V_GEN)cd $(PDIR) && python setup.py --quiet build 3>&1 1>&2 2>&3 \ | |
448 | | grep -v "command line option.*Wstrict-prototypes"; true | |
f2a189f0 | 449 | $(AM_V_at)touch $(PDIR)/timestamp |
f7740954 ML |
450 | |
451 | python-install: | |
f2a189f0 | 452 | cd $(PDIR) && python setup.py --quiet install --prefix $(prefix) |
f7740954 | 453 | |
c26162ff BV |
454 | python-clean: |
455 | $(AM_V_at)$(MAKE) python-quietclean | |
f2a189f0 | 456 | $(AM_V_at)rm -f $(PDIR)/timestamp |
f7740954 ML |
457 | |
458 | BUILD_EXTRA += python-build | |
459 | INSTALL_EXTRA += python-install | |
460 | CLEAN_EXTRA += python-clean | |
461 | ||
462 | endif | |
463 | ||
9fcf4d0b ML |
464 | if BINDINGS_JAVA |
465 | ||
466 | JDIR = bindings/java | |
467 | JPKG = org/sigrok/core/classes | |
468 | JINT = $(JDIR)/$(JPKG)/classes.i | |
469 | JSRC = $(JDIR)/$(JPKG)/classes_wrap.cxx | |
470 | JLIB = $(JDIR)/libsigrok_java_core_classes.so | |
471 | JJAR = $(JDIR)/sigrok-core.jar | |
472 | ||
473 | java-build: $(JJAR) $(JLIB) | |
474 | ||
580ed400 | 475 | $(JSRC): $(JINT) bindings/swig/classes.i $(library_include_HEADERS) |
f2a189f0 | 476 | $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \ |
9fcf4d0b ML |
477 | -Iinclude -Ibindings/cxx/include \ |
478 | -outdir $(JDIR)/$(JPKG) $(JINT) | |
479 | ||
480 | $(JJAR): $(JSRC) $(JDIR)/$(JPKG)/*.java | |
f2a189f0 BV |
481 | $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) $(JDIR)/$(JPKG)/*.java |
482 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) | |
9fcf4d0b | 483 | |
580ed400 | 484 | $(JLIB): $(JSRC) bindings/cxx/libsigrokxx.la $(library_include_HEADERS) |
f2a189f0 | 485 | $(AM_V_GEN)$(CXX) $(CXXFLAGS) -L.libs -Lbindings/cxx/.libs \ |
9fcf4d0b ML |
486 | -fno-strict-aliasing -fPIC -shared \ |
487 | $(JDIR)/$(JPKG)/classes_wrap.cxx -lsigrokxx \ | |
488 | -o $(JLIB) | |
489 | ||
490 | java-install: | |
491 | $(INSTALL) -d $(libdir)/jni | |
492 | $(INSTALL) $(JLIB) -t $(libdir)/jni | |
493 | $(INSTALL) -d $(datadir)/java | |
494 | $(INSTALL) $(JJAR) -t $(datadir)/java | |
495 | ||
496 | java-clean: | |
d1785122 ML |
497 | rm -f $(JSRC) |
498 | rm -f $(JDIR)/$(JPKG)/*.class | |
499 | rm -f $(JJAR) | |
500 | rm -f $(JLIB) | |
9fcf4d0b ML |
501 | |
502 | BUILD_EXTRA += java-build | |
503 | INSTALL_EXTRA += java-install | |
504 | CLEAN_EXTRA += java-clean | |
505 | ||
506 | endif | |
507 | ||
f7740954 ML |
508 | all-local: $(BUILD_EXTRA) |
509 | install-exec-local: $(INSTALL_EXTRA) | |
d1785122 | 510 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 511 | |
c0958408 | 512 | MAINTAINERCLEANFILES = ChangeLog |
0fc12d66 UH |
513 | |
514 | .PHONY: ChangeLog | |
515 | ChangeLog: | |
bd58d8f3 | 516 | git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog |
0fc12d66 UH |
517 | |
518 | dist-hook: ChangeLog | |
519 |