Makefile.am 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. ##
  2. ## This file is part of the libsigrok project.
  3. ##
  4. ## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
  5. ## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
  6. ##
  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.
  11. ##
  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.
  16. ##
  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/>.
  19. ##
  20. ACLOCAL_AMFLAGS = -I m4
  21. AM_LIBTOOLFLAGS = --silent
  22. GNUMAKEFLAGS = --no-print-directory
  23. # distutils/setuptools cause trouble on distcheck. Disable for now.
  24. DISTCHECK_CONFIGURE_FLAGS = --disable-python
  25. FIRMWARE_DIR = $(datadir)/sigrok-firmware
  26. local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I.
  27. if BINDINGS_CXX
  28. local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx
  29. endif
  30. # Do not hard-code the firmware location on Windows.
  31. if WIN32
  32. global_defs =
  33. else
  34. global_defs = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
  35. endif
  36. # Ensure that local include directories are always searched first.
  37. AM_CPPFLAGS = $(local_includes) $(global_defs)
  38. # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the
  39. # python bindings CFLAGS are a superset of the C++ bindings CFLAGS.
  40. AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS)
  41. AM_CXXFLAGS = $(SR_WXXFLAGS) $(LIBSIGROKCXX_CFLAGS)
  42. lib_LTLIBRARIES = libsigrok.la
  43. # Backend files
  44. libsigrok_la_SOURCES = \
  45. src/backend.c \
  46. src/device.c \
  47. src/session.c \
  48. src/session_file.c \
  49. src/session_driver.c \
  50. src/hwdriver.c \
  51. src/trigger.c \
  52. src/soft-trigger.c \
  53. src/analog.c \
  54. src/fallback.c \
  55. src/resource.c \
  56. src/strutil.c \
  57. src/log.c \
  58. src/version.c \
  59. src/error.c \
  60. src/std.c \
  61. src/sw_limits.c
  62. # Input modules
  63. libsigrok_la_SOURCES += \
  64. src/input/input.c \
  65. src/input/binary.c \
  66. src/input/chronovu_la8.c \
  67. src/input/csv.c \
  68. src/input/raw_analog.c \
  69. src/input/trace32_ad.c \
  70. src/input/vcd.c \
  71. src/input/wav.c
  72. # Output modules
  73. libsigrok_la_SOURCES += \
  74. src/output/output.c \
  75. src/output/analog.c \
  76. src/output/ascii.c \
  77. src/output/bits.c \
  78. src/output/binary.c \
  79. src/output/csv.c \
  80. src/output/chronovu_la8.c \
  81. src/output/wav.c \
  82. src/output/hex.c \
  83. src/output/ols.c \
  84. src/output/srzip.c \
  85. src/output/vcd.c
  86. # Transform modules
  87. libsigrok_la_SOURCES += \
  88. src/transform/transform.c \
  89. src/transform/nop.c \
  90. src/transform/scale.c \
  91. src/transform/invert.c
  92. # SCPI support
  93. libsigrok_la_SOURCES += \
  94. src/scpi.h \
  95. src/scpi/scpi.c \
  96. src/scpi/helpers.c \
  97. src/scpi/scpi_tcp.c
  98. if NEED_RPC
  99. libsigrok_la_SOURCES += \
  100. src/scpi/scpi_vxi.c \
  101. src/scpi/vxi_clnt.c \
  102. src/scpi/vxi_xdr.c \
  103. src/scpi/vxi.h
  104. endif
  105. if NEED_SERIAL
  106. libsigrok_la_SOURCES += \
  107. src/serial.c \
  108. src/scpi/scpi_serial.c
  109. endif
  110. if NEED_USB
  111. libsigrok_la_SOURCES += \
  112. src/ezusb.c \
  113. src/usb.c \
  114. src/scpi/scpi_usbtmc_libusb.c
  115. endif
  116. if NEED_VISA
  117. libsigrok_la_SOURCES += \
  118. src/scpi/scpi_visa.c
  119. endif
  120. if NEED_GPIB
  121. libsigrok_la_SOURCES += \
  122. src/scpi/scpi_libgpib.c
  123. endif
  124. # Modbus support
  125. libsigrok_la_SOURCES += \
  126. src/modbus/modbus.c
  127. if NEED_SERIAL
  128. libsigrok_la_SOURCES += \
  129. src/modbus/modbus_serial_rtu.c
  130. endif
  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 \
  138. src/dmm/asycii.c \
  139. src/dmm/rs9lcd.c \
  140. src/dmm/bm25x.c \
  141. src/dmm/ut71x.c \
  142. src/dmm/ut372.c \
  143. src/dmm/vc870.c \
  144. src/dmm/dtm0660.c
  145. # Hardware (LCR chip parsers)
  146. if NEED_SERIAL
  147. libsigrok_la_SOURCES += \
  148. src/lcr/es51919.c
  149. endif
  150. # Hardware (Scale protocol parsers)
  151. libsigrok_la_SOURCES += \
  152. src/scale/kern.c
  153. # Hardware drivers
  154. noinst_LTLIBRARIES = src/libdrivers.la
  155. src/libdrivers.o: src/libdrivers.la
  156. $(AM_V_CCLD)$(LINK) src/libdrivers.la
  157. src/libdrivers.lo: src/libdrivers.o
  158. $(AM_V_GEN)echo "# Generated by libtool" > $@
  159. $(AM_V_at)echo "pic_object='libdrivers.o'" >> $@
  160. $(AM_V_at)echo "non_pic_object='libdrivers.o'" >> $@
  161. src_libdrivers_la_SOURCES = src/drivers.c
  162. if HW_AGILENT_DMM
  163. src_libdrivers_la_SOURCES += \
  164. src/hardware/agilent-dmm/protocol.h \
  165. src/hardware/agilent-dmm/protocol.c \
  166. src/hardware/agilent-dmm/api.c
  167. endif
  168. if HW_APPA_55II
  169. src_libdrivers_la_SOURCES += \
  170. src/hardware/appa-55ii/protocol.h \
  171. src/hardware/appa-55ii/protocol.c \
  172. src/hardware/appa-55ii/api.c
  173. endif
  174. if HW_ARACHNID_LABS_RE_LOAD_PRO
  175. src_libdrivers_la_SOURCES += \
  176. src/hardware/arachnid-labs-re-load-pro/protocol.h \
  177. src/hardware/arachnid-labs-re-load-pro/protocol.c \
  178. src/hardware/arachnid-labs-re-load-pro/api.c
  179. endif
  180. if HW_ASIX_SIGMA
  181. src_libdrivers_la_SOURCES += \
  182. src/hardware/asix-sigma/protocol.h \
  183. src/hardware/asix-sigma/protocol.c \
  184. src/hardware/asix-sigma/api.c
  185. endif
  186. if HW_ATTEN_PPS3XXX
  187. src_libdrivers_la_SOURCES += \
  188. src/hardware/atten-pps3xxx/protocol.h \
  189. src/hardware/atten-pps3xxx/protocol.c \
  190. src/hardware/atten-pps3xxx/api.c
  191. endif
  192. if HW_BAYLIBRE_ACME
  193. src_libdrivers_la_SOURCES += \
  194. src/hardware/baylibre-acme/protocol.h \
  195. src/hardware/baylibre-acme/protocol.c \
  196. src/hardware/baylibre-acme/api.c \
  197. src/hardware/baylibre-acme/gpio.h \
  198. src/hardware/baylibre-acme/gpio.c
  199. endif
  200. if HW_BEAGLELOGIC
  201. src_libdrivers_la_SOURCES += \
  202. src/hardware/beaglelogic/beaglelogic.h \
  203. src/hardware/beaglelogic/protocol.h \
  204. src/hardware/beaglelogic/protocol.c \
  205. src/hardware/beaglelogic/api.c
  206. endif
  207. if HW_BRYMEN_BM86X
  208. src_libdrivers_la_SOURCES += \
  209. src/hardware/brymen-bm86x/protocol.h \
  210. src/hardware/brymen-bm86x/protocol.c \
  211. src/hardware/brymen-bm86x/api.c
  212. endif
  213. if HW_BRYMEN_DMM
  214. src_libdrivers_la_SOURCES += \
  215. src/hardware/brymen-dmm/parser.c \
  216. src/hardware/brymen-dmm/protocol.h \
  217. src/hardware/brymen-dmm/protocol.c \
  218. src/hardware/brymen-dmm/api.c
  219. endif
  220. if HW_CEM_DT_885X
  221. src_libdrivers_la_SOURCES += \
  222. src/hardware/cem-dt-885x/protocol.h \
  223. src/hardware/cem-dt-885x/protocol.c \
  224. src/hardware/cem-dt-885x/api.c
  225. endif
  226. if HW_CENTER_3XX
  227. src_libdrivers_la_SOURCES += \
  228. src/hardware/center-3xx/protocol.h \
  229. src/hardware/center-3xx/protocol.c \
  230. src/hardware/center-3xx/api.c
  231. endif
  232. if HW_CHRONOVU_LA
  233. src_libdrivers_la_SOURCES += \
  234. src/hardware/chronovu-la/protocol.h \
  235. src/hardware/chronovu-la/protocol.c \
  236. src/hardware/chronovu-la/api.c
  237. endif
  238. if HW_COLEAD_SLM
  239. src_libdrivers_la_SOURCES += \
  240. src/hardware/colead-slm/protocol.h \
  241. src/hardware/colead-slm/protocol.c \
  242. src/hardware/colead-slm/api.c
  243. endif
  244. if HW_CONRAD_DIGI_35_CPU
  245. src_libdrivers_la_SOURCES += \
  246. src/hardware/conrad-digi-35-cpu/protocol.h \
  247. src/hardware/conrad-digi-35-cpu/protocol.c \
  248. src/hardware/conrad-digi-35-cpu/api.c
  249. endif
  250. if HW_DEMO
  251. src_libdrivers_la_SOURCES += \
  252. src/hardware/demo/protocol.h \
  253. src/hardware/demo/protocol.c \
  254. src/hardware/demo/api.c
  255. endif
  256. if HW_FLUKE_DMM
  257. src_libdrivers_la_SOURCES += \
  258. src/hardware/fluke-dmm/protocol.h \
  259. src/hardware/fluke-dmm/protocol.c \
  260. src/hardware/fluke-dmm/api.c
  261. endif
  262. if HW_FTDI_LA
  263. src_libdrivers_la_SOURCES += \
  264. src/hardware/ftdi-la/protocol.h \
  265. src/hardware/ftdi-la/protocol.c \
  266. src/hardware/ftdi-la/api.c
  267. endif
  268. if HW_FX2LAFW
  269. src_libdrivers_la_SOURCES += \
  270. src/hardware/fx2lafw/protocol.h \
  271. src/hardware/fx2lafw/protocol.c \
  272. src/hardware/fx2lafw/api.c \
  273. src/hardware/fx2lafw/dslogic.c \
  274. src/hardware/fx2lafw/dslogic.h
  275. endif
  276. if HW_GMC_MH_1X_2X
  277. src_libdrivers_la_SOURCES += \
  278. src/hardware/gmc-mh-1x-2x/protocol.h \
  279. src/hardware/gmc-mh-1x-2x/protocol.c \
  280. src/hardware/gmc-mh-1x-2x/api.c
  281. endif
  282. if HW_GWINSTEK_GDS_800
  283. src_libdrivers_la_SOURCES += \
  284. src/hardware/gwinstek-gds-800/protocol.h \
  285. src/hardware/gwinstek-gds-800/protocol.c \
  286. src/hardware/gwinstek-gds-800/api.c
  287. endif
  288. if HW_HAMEG_HMO
  289. src_libdrivers_la_SOURCES += \
  290. src/hardware/hameg-hmo/protocol.h \
  291. src/hardware/hameg-hmo/protocol.c \
  292. src/hardware/hameg-hmo/api.c
  293. endif
  294. if HW_HANTEK_6XXX
  295. src_libdrivers_la_SOURCES += \
  296. src/hardware/hantek-6xxx/protocol.h \
  297. src/hardware/hantek-6xxx/protocol.c \
  298. src/hardware/hantek-6xxx/api.c
  299. endif
  300. if HW_HANTEK_DSO
  301. src_libdrivers_la_SOURCES += \
  302. src/hardware/hantek-dso/protocol.h \
  303. src/hardware/hantek-dso/protocol.c \
  304. src/hardware/hantek-dso/api.c
  305. endif
  306. if HW_HP_3457A
  307. src_libdrivers_la_SOURCES += \
  308. src/hardware/hp-3457a/protocol.h \
  309. src/hardware/hp-3457a/protocol.c \
  310. src/hardware/hp-3457a/api.c
  311. endif
  312. if HW_HUNG_CHANG_DSO_2100
  313. src_libdrivers_la_SOURCES += \
  314. src/hardware/hung-chang-dso-2100/protocol.h \
  315. src/hardware/hung-chang-dso-2100/protocol.c \
  316. src/hardware/hung-chang-dso-2100/api.c
  317. endif
  318. if HW_IKALOGIC_SCANALOGIC2
  319. src_libdrivers_la_SOURCES += \
  320. src/hardware/ikalogic-scanalogic2/protocol.h \
  321. src/hardware/ikalogic-scanalogic2/protocol.c \
  322. src/hardware/ikalogic-scanalogic2/api.c
  323. endif
  324. if HW_IKALOGIC_SCANAPLUS
  325. src_libdrivers_la_SOURCES += \
  326. src/hardware/ikalogic-scanaplus/protocol.h \
  327. src/hardware/ikalogic-scanaplus/protocol.c \
  328. src/hardware/ikalogic-scanaplus/api.c
  329. endif
  330. if HW_KECHENG_KC_330B
  331. src_libdrivers_la_SOURCES += \
  332. src/hardware/kecheng-kc-330b/protocol.h \
  333. src/hardware/kecheng-kc-330b/protocol.c \
  334. src/hardware/kecheng-kc-330b/api.c
  335. endif
  336. if HW_KERN_SCALE
  337. src_libdrivers_la_SOURCES += \
  338. src/hardware/kern-scale/protocol.h \
  339. src/hardware/kern-scale/protocol.c \
  340. src/hardware/kern-scale/api.c
  341. endif
  342. if HW_KORAD_KAXXXXP
  343. src_libdrivers_la_SOURCES += \
  344. src/hardware/korad-kaxxxxp/protocol.h \
  345. src/hardware/korad-kaxxxxp/protocol.c \
  346. src/hardware/korad-kaxxxxp/api.c
  347. endif
  348. if HW_LASCAR_EL_USB
  349. src_libdrivers_la_SOURCES += \
  350. src/hardware/lascar-el-usb/protocol.h \
  351. src/hardware/lascar-el-usb/protocol.c \
  352. src/hardware/lascar-el-usb/api.c
  353. endif
  354. if HW_LECROY_LOGICSTUDIO
  355. src_libdrivers_la_SOURCES += \
  356. src/hardware/lecroy-logicstudio/protocol.h \
  357. src/hardware/lecroy-logicstudio/protocol.c \
  358. src/hardware/lecroy-logicstudio/api.c
  359. endif
  360. if HW_LECROY_XSTREAM
  361. src_libdrivers_la_SOURCES += \
  362. src/hardware/lecroy-xstream/protocol.h \
  363. src/hardware/lecroy-xstream/protocol.c \
  364. src/hardware/lecroy-xstream/api.c
  365. endif
  366. if HW_MANSON_HCS_3XXX
  367. src_libdrivers_la_SOURCES += \
  368. src/hardware/manson-hcs-3xxx/protocol.h \
  369. src/hardware/manson-hcs-3xxx/protocol.c \
  370. src/hardware/manson-hcs-3xxx/api.c
  371. endif
  372. if HW_MAYNUO_M97
  373. src_libdrivers_la_SOURCES += \
  374. src/hardware/maynuo-m97/protocol.h \
  375. src/hardware/maynuo-m97/protocol.c \
  376. src/hardware/maynuo-m97/api.c
  377. endif
  378. if HW_MIC_985XX
  379. src_libdrivers_la_SOURCES += \
  380. src/hardware/mic-985xx/protocol.h \
  381. src/hardware/mic-985xx/protocol.c \
  382. src/hardware/mic-985xx/api.c
  383. endif
  384. if HW_MOTECH_LPS_30X
  385. src_libdrivers_la_SOURCES += \
  386. src/hardware/motech-lps-30x/protocol.h \
  387. src/hardware/motech-lps-30x/protocol.c \
  388. src/hardware/motech-lps-30x/api.c
  389. endif
  390. if HW_NORMA_DMM
  391. src_libdrivers_la_SOURCES += \
  392. src/hardware/norma-dmm/protocol.h \
  393. src/hardware/norma-dmm/protocol.c \
  394. src/hardware/norma-dmm/api.c
  395. endif
  396. if HW_OPENBENCH_LOGIC_SNIFFER
  397. src_libdrivers_la_SOURCES += \
  398. src/hardware/openbench-logic-sniffer/protocol.h \
  399. src/hardware/openbench-logic-sniffer/protocol.c \
  400. src/hardware/openbench-logic-sniffer/api.c
  401. endif
  402. if HW_PCE_322A
  403. src_libdrivers_la_SOURCES += \
  404. src/hardware/pce-322a/protocol.h \
  405. src/hardware/pce-322a/protocol.c \
  406. src/hardware/pce-322a/api.c
  407. endif
  408. if HW_PIPISTRELLO_OLS
  409. src_libdrivers_la_SOURCES += \
  410. src/hardware/pipistrello-ols/protocol.h \
  411. src/hardware/pipistrello-ols/protocol.c \
  412. src/hardware/pipistrello-ols/api.c
  413. endif
  414. if HW_RIGOL_DS
  415. src_libdrivers_la_SOURCES += \
  416. src/hardware/rigol-ds/protocol.h \
  417. src/hardware/rigol-ds/protocol.c \
  418. src/hardware/rigol-ds/api.c
  419. endif
  420. if HW_ROHDE_SCHWARZ_SME_0X
  421. src_libdrivers_la_SOURCES += \
  422. src/hardware/rohde-schwarz-sme-0x/protocol.h \
  423. src/hardware/rohde-schwarz-sme-0x/protocol.c \
  424. src/hardware/rohde-schwarz-sme-0x/api.c
  425. endif
  426. if HW_SALEAE_LOGIC16
  427. src_libdrivers_la_SOURCES += \
  428. src/hardware/saleae-logic16/protocol.h \
  429. src/hardware/saleae-logic16/protocol.c \
  430. src/hardware/saleae-logic16/api.c
  431. endif
  432. if HW_SCPI_PPS
  433. src_libdrivers_la_SOURCES += \
  434. src/hardware/scpi-pps/protocol.h \
  435. src/hardware/scpi-pps/protocol.c \
  436. src/hardware/scpi-pps/profiles.c \
  437. src/hardware/scpi-pps/api.c
  438. endif
  439. if HW_SERIAL_DMM
  440. src_libdrivers_la_SOURCES += \
  441. src/hardware/serial-dmm/protocol.h \
  442. src/hardware/serial-dmm/protocol.c \
  443. src/hardware/serial-dmm/api.c
  444. endif
  445. if HW_SERIAL_LCR
  446. src_libdrivers_la_SOURCES += \
  447. src/hardware/serial-lcr/api.c
  448. endif
  449. if HW_SYSCLK_LWLA
  450. src_libdrivers_la_SOURCES += \
  451. src/hardware/sysclk-lwla/lwla.h \
  452. src/hardware/sysclk-lwla/lwla.c \
  453. src/hardware/sysclk-lwla/lwla1016.c \
  454. src/hardware/sysclk-lwla/lwla1034.c \
  455. src/hardware/sysclk-lwla/protocol.h \
  456. src/hardware/sysclk-lwla/protocol.c \
  457. src/hardware/sysclk-lwla/api.c
  458. endif
  459. if HW_TELEINFO
  460. src_libdrivers_la_SOURCES += \
  461. src/hardware/teleinfo/protocol.h \
  462. src/hardware/teleinfo/protocol.c \
  463. src/hardware/teleinfo/api.c
  464. endif
  465. if HW_TESTO
  466. src_libdrivers_la_SOURCES += \
  467. src/hardware/testo/protocol.h \
  468. src/hardware/testo/protocol.c \
  469. src/hardware/testo/api.c
  470. endif
  471. if HW_TONDAJ_SL_814
  472. src_libdrivers_la_SOURCES += \
  473. src/hardware/tondaj-sl-814/protocol.h \
  474. src/hardware/tondaj-sl-814/protocol.c \
  475. src/hardware/tondaj-sl-814/api.c
  476. endif
  477. if HW_UNI_T_DMM
  478. src_libdrivers_la_SOURCES += \
  479. src/hardware/uni-t-dmm/protocol.h \
  480. src/hardware/uni-t-dmm/protocol.c \
  481. src/hardware/uni-t-dmm/api.c
  482. endif
  483. if HW_UNI_T_UT32X
  484. src_libdrivers_la_SOURCES += \
  485. src/hardware/uni-t-ut32x/protocol.h \
  486. src/hardware/uni-t-ut32x/protocol.c \
  487. src/hardware/uni-t-ut32x/api.c
  488. endif
  489. if HW_VICTOR_DMM
  490. src_libdrivers_la_SOURCES += \
  491. src/hardware/victor-dmm/protocol.h \
  492. src/hardware/victor-dmm/protocol.c \
  493. src/hardware/victor-dmm/api.c
  494. endif
  495. if HW_YOKOGAWA_DLM
  496. src_libdrivers_la_SOURCES += \
  497. src/hardware/yokogawa-dlm/protocol.h \
  498. src/hardware/yokogawa-dlm/protocol.c \
  499. src/hardware/yokogawa-dlm/protocol_wrappers.h \
  500. src/hardware/yokogawa-dlm/protocol_wrappers.c \
  501. src/hardware/yokogawa-dlm/api.c
  502. endif
  503. if HW_ZEROPLUS_LOGIC_CUBE
  504. src_libdrivers_la_SOURCES += \
  505. src/hardware/zeroplus-logic-cube/analyzer.c \
  506. src/hardware/zeroplus-logic-cube/analyzer.h \
  507. src/hardware/zeroplus-logic-cube/gl_usb.h \
  508. src/hardware/zeroplus-logic-cube/gl_usb.c \
  509. src/hardware/zeroplus-logic-cube/protocol.h \
  510. src/hardware/zeroplus-logic-cube/protocol.c \
  511. src/hardware/zeroplus-logic-cube/api.c
  512. endif
  513. libsigrok_la_LIBADD = src/libdrivers.lo $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS)
  514. libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
  515. library_includedir = $(includedir)/libsigrok
  516. library_include_HEADERS = \
  517. include/libsigrok/libsigrok.h \
  518. include/libsigrok/proto.h
  519. nodist_library_include_HEADERS = \
  520. include/libsigrok/version.h
  521. noinst_HEADERS = src/libsigrok-internal.h
  522. pkgconfigdir = $(libdir)/pkgconfig
  523. pkgconfig_DATA = libsigrok.pc
  524. mimeappdir = $(datadir)/mime/application
  525. mimeapp_DATA = contrib/vnd.sigrok.session.xml
  526. mimeicondir = $(datadir)/icons/hicolor/48x48/mimetypes
  527. mimeicon_DATA = contrib/libsigrok.png
  528. mimeiconscalabledir = $(datadir)/icons/hicolor/scalable/mimetypes
  529. mimeiconscalable_DATA = contrib/libsigrok.svg
  530. EXTRA_DIST = \
  531. Doxyfile \
  532. HACKING \
  533. README.devices \
  534. bindings/cxx/ConfigKey_methods.cpp \
  535. bindings/cxx/ConfigKey_methods.hpp \
  536. bindings/cxx/ConfigKey_methods.i \
  537. bindings/cxx/Doxyfile \
  538. bindings/cxx/QuantityFlag_methods.cpp \
  539. bindings/cxx/QuantityFlag_methods.hpp \
  540. bindings/cxx/enums.py \
  541. bindings/python/Doxyfile \
  542. bindings/python/setup.py \
  543. bindings/python/sigrok/__init__.py \
  544. bindings/python/sigrok/core/__init__.py \
  545. bindings/python/sigrok/core/classes.i \
  546. bindings/ruby/classes.i \
  547. bindings/java/Doxyfile \
  548. bindings/java/org/sigrok/core/classes/classes.i \
  549. bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \
  550. bindings/java/org/sigrok/core/interfaces/LogCallback.java \
  551. bindings/swig/classes.i \
  552. bindings/swig/doc.py \
  553. bindings/swig/templates.i \
  554. contrib/libsigrok_112x112.png \
  555. contrib/libsigrok.png \
  556. contrib/libsigrok.svg \
  557. contrib/vnd.sigrok.session.xml \
  558. contrib/z60_libsigrok.rules
  559. if HAVE_CHECK
  560. TESTS = tests/main
  561. check_PROGRAMS = ${TESTS}
  562. endif
  563. tests_main_SOURCES = \
  564. include/libsigrok/libsigrok.h \
  565. tests/lib.c \
  566. tests/lib.h \
  567. tests/main.c \
  568. tests/core.c \
  569. tests/input_all.c \
  570. tests/input_binary.c \
  571. tests/output_all.c \
  572. tests/transform_all.c \
  573. tests/session.c \
  574. tests/strutil.c \
  575. tests/version.c \
  576. tests/driver_all.c \
  577. tests/device.c \
  578. tests/trigger.c \
  579. tests/analog.c
  580. tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS)
  581. BUILD_EXTRA =
  582. INSTALL_EXTRA =
  583. UNINSTALL_EXTRA =
  584. CLEAN_EXTRA =
  585. libsigrok-uninstall:
  586. -rmdir $(DESTDIR)$(includedir)/libsigrok
  587. UNINSTALL_EXTRA += libsigrok-uninstall
  588. if BINDINGS_CXX
  589. lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
  590. bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
  591. bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS)
  592. bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
  593. bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
  594. bindings_cxx_libsigrokcxx_la_include_HEADERS = \
  595. bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
  596. nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \
  597. bindings/cxx/include/libsigrokcxx/enums.hpp
  598. pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
  599. doxy/xml/index.xml: include/libsigrok/libsigrok.h
  600. $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
  601. bindings/swig/enums.i: bindings/cxx/enums.timestamp
  602. bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
  603. bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
  604. bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
  605. bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
  606. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
  607. $(AM_V_at)touch $@
  608. bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
  609. $(library_include_HEADERS) $(nodist_library_include_HEADERS)
  610. cxx-clean:
  611. rm -rf doxy/
  612. rm -rf bindings/cxx/doxy/
  613. rm -f bindings/swig/enums.i
  614. rm -f bindings/cxx/enums.cpp
  615. rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
  616. rm -f bindings/cxx/enums.timestamp
  617. CLEAN_EXTRA += cxx-clean
  618. cxx-uninstall:
  619. -rmdir $(DESTDIR)$(includedir)/libsigrokcxx
  620. UNINSTALL_EXTRA += cxx-uninstall
  621. endif
  622. CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
  623. $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
  624. bindings/cxx/enums.timestamp
  625. $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
  626. # Macro definitions to be used by the SWIG parser.
  627. swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS=
  628. if BINDINGS_PYTHON
  629. PDIR = bindings/python
  630. PDOC_START = bindings/python/sigrok/core/doc_start.i
  631. PDOC_END = bindings/python/sigrok/core/doc_end.i
  632. setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CXX='$(CXX)' CFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' CXXFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' LDADD='$(PYSIGROK_LIBS)'
  633. setup_quiet = --quiet
  634. setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet)
  635. $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  636. $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
  637. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@
  638. $(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  639. $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
  640. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@
  641. python-build: $(PDIR)/timestamp
  642. $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \
  643. bindings/swig/classes.i bindings/swig/templates.i \
  644. bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \
  645. $(library_include_HEADERS) \
  646. $(nodist_library_include_HEADERS) \
  647. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  648. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  649. @ORDER@ bindings/cxx/libsigrokcxx.la
  650. $(AM_V_at)$(setup_py) clean --all 2>/dev/null
  651. $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py
  652. $(AM_V_at): >$@
  653. python-install:
  654. $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)"
  655. destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \
  656. --prefix "$(prefix)" --exec-prefix "$(exec_prefix)"
  657. python-clean:
  658. -$(AM_V_at)rm -f $(PDIR)/timestamp
  659. -$(AM_V_at)rm -fr $(PDIR)/doxy
  660. -$(AM_V_at)$(setup_py) clean --all 2>/dev/null
  661. python-doc:
  662. $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null
  663. BUILD_EXTRA += python-build
  664. INSTALL_EXTRA += python-install
  665. CLEAN_EXTRA += python-clean
  666. endif
  667. if BINDINGS_RUBY
  668. RDIR = bindings/ruby
  669. RDOC = $(RDIR)/doc.i
  670. RWRAP = $(RDIR)/classes_wrap.cpp
  671. ROBJ = $(RWRAP:.cpp=.o)
  672. REXT = $(RDIR)/sigrok.$(RUBY_DLEXT)
  673. $(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  674. $(AM_V_at)test -d $(RDIR) || $(MKDIR_P) $(RDIR)
  675. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@
  676. $(RWRAP): $(srcdir)/$(RDIR)/classes.i $(RDOC) \
  677. bindings/swig/classes.i bindings/swig/templates.i \
  678. bindings/swig/enums.i
  679. $(AM_V_GEN)$(SWIG) -ruby -c++ -Ibindings -Ibindings/cxx/include -I$(RDIR) $(local_includes) $(swig_defs) -o $@ $(srcdir)/$(RDIR)/classes.i
  680. $(ROBJ): $(RWRAP) \
  681. $(library_include_HEADERS) \
  682. $(nodist_library_include_HEADERS) \
  683. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  684. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS)
  685. $(AM_V_CXX)$(CXX) $(RBSIGROK_CFLAGS) -I. -Iinclude -Ibindings/cxx/include $(local_includes) -fPIC -o $@ -c $(RWRAP)
  686. $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la
  687. $(AM_V_CXXLD)$(CXX) -shared -o $@ $(ROBJ) -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS)
  688. ruby-build: $(REXT)
  689. ruby-install: $(REXT)
  690. $(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
  691. $(INSTALL) $(REXT) $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
  692. ruby-uninstall:
  693. rm -f $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)/sigrok.$(RUBY_DLEXT)
  694. ruby-clean:
  695. -$(AM_V_at)rm -fr $(RDIR)/doc
  696. -$(AM_V_at)rm -f $(REXT) $(ROBJ) $(RWRAP) $(RDOC)
  697. ruby-doc: $(RWRAP)
  698. $(AM_V_at)yard doc -o $(RDIR)/doc $(RWRAP)
  699. BUILD_EXTRA += ruby-build
  700. INSTALL_EXTRA += ruby-install
  701. UNINSTALL_EXTRA += ruby-uninstall
  702. CLEAN_EXTRA += ruby-clean
  703. endif
  704. if BINDINGS_JAVA
  705. JDIR = bindings/java
  706. JPKG = org/sigrok/core
  707. JCLS = $(JDIR)/$(JPKG)/classes
  708. JINT = $(JDIR)/$(JPKG)/interfaces
  709. JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
  710. JSWG = $(JCLS)/classes.i
  711. JDOC = $(JCLS)/doc.i
  712. JCXX = $(JCLS)/classes_wrap.cxx
  713. JLIB = $(JDIR)/libsigrok_java_core_classes.so
  714. JJAR = $(JDIR)/sigrok-core.jar
  715. java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB)
  716. java-build: $(JJAR) $(JLIB)
  717. $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  718. $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
  719. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@
  720. $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \
  721. bindings/swig/templates.i bindings/swig/enums.i \
  722. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  723. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS)
  724. -$(AM_V_at)rm -f $(java_cleanfiles)
  725. $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \
  726. -java -package org.sigrok.core.classes \
  727. -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \
  728. -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG)
  729. $(JJAR): $(JCXX)
  730. $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC)
  731. $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
  732. $(JLIB): $(JCXX) \
  733. $(library_include_HEADERS) $(nodist_library_include_HEADERS) \
  734. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  735. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  736. @ORDER@ bindings/cxx/libsigrokcxx.la
  737. $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) $(LDFLAGS) -L.libs -Lbindings/cxx/.libs \
  738. -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
  739. -lsigrokcxx $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) -o $(JLIB)
  740. java-install:
  741. $(INSTALL) -d $(DESTDIR)$(libdir)/jni
  742. $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni
  743. $(INSTALL) -d $(DESTDIR)$(datadir)/java
  744. $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java
  745. java-uninstall:
  746. -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar
  747. -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so
  748. java-clean:
  749. -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC)
  750. -$(AM_V_at)rm -fr $(JDIR)/doxy
  751. java-doc:
  752. $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile
  753. BUILD_EXTRA += java-build
  754. INSTALL_EXTRA += java-install
  755. UNINSTALL_EXTRA += java-uninstall
  756. CLEAN_EXTRA += java-clean
  757. endif
  758. all-local: $(BUILD_EXTRA)
  759. install-exec-local: $(INSTALL_EXTRA)
  760. uninstall-hook: $(UNINSTALL_EXTRA)
  761. clean-local: $(CLEAN_EXTRA)
  762. .PHONY: dist-changelog
  763. dist-hook: dist-changelog
  764. dist-changelog:
  765. $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \
  766. cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \
  767. elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \
  768. mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
  769. else \
  770. rm -f .ChangeLog.tmp; exit 1; \
  771. fi