Makefile.am 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934
  1. # SPDX-License-Identifier: GPL-3.0-or-later
  2. AUTOMAKE_OPTIONS = foreign subdir-objects 1.11
  3. ACLOCAL_AMFLAGS = -I build/m4
  4. MAINTAINERCLEANFILES = \
  5. config.log config.status \
  6. $(srcdir)/Makefile.in \
  7. $(srcdir)/config.h.in $(srcdir)/config.h.in~ $(srcdir)/configure \
  8. $(srcdir)/install-sh $(srcdir)/ltmain.sh $(srcdir)/missing \
  9. $(srcdir)/compile $(srcdir)/depcomp $(srcdir)/aclocal.m4 \
  10. $(srcdir)/config.guess $(srcdir)/config.sub \
  11. $(srcdir)/m4/ltsugar.m4 $(srcdir)/m4/libtool.m4 \
  12. $(srcdir)/m4/ltversion.m4 $(srcdir)/m4/lt~obsolete.m4 \
  13. $(srcdir)/m4/ltoptions.m4 \
  14. $(srcdir)/pkcs11-helper.spec $(srcdir)/config-w32-vc.h
  15. CLEANFILES = \
  16. $(srcdir)/$(distdir).tar.gz
  17. EXTRA_DIST = \
  18. .gitignore \
  19. .csslintrc \
  20. .eslintignore \
  21. .eslintrc \
  22. .github/CODEOWNERS \
  23. build/m4/jemalloc.m4 \
  24. build/m4/ax_c___atomic.m4 \
  25. build/m4/ax_check_enable_debug.m4 \
  26. build/m4/ax_c_mallinfo.m4 \
  27. build/m4/ax_gcc_func_attribute.m4 \
  28. build/m4/ax_check_compile_flag.m4 \
  29. build/m4/ax_c_statement_expressions.m4 \
  30. build/m4/ax_pthread.m4 \
  31. build/m4/ax_c_lto.m4 \
  32. build/m4/ax_c_mallopt.m4 \
  33. build/m4/tcmalloc.m4 \
  34. build/m4/ax_c__generic.m4 \
  35. README.md \
  36. CONTRIBUTORS.md \
  37. CODE_OF_CONDUCT.md \
  38. LICENSE \
  39. REDISTRIBUTED.md \
  40. CONTRIBUTING.md \
  41. $(NULL)
  42. SUBDIRS = \
  43. diagrams \
  44. system \
  45. tests \
  46. $(NULL)
  47. dist_noinst_DATA = \
  48. CHANGELOG.md \
  49. cppcheck.sh \
  50. configs.signatures \
  51. contrib \
  52. netdata.cppcheck \
  53. netdata.spec \
  54. package.json \
  55. docs \
  56. packaging/version \
  57. packaging/dashboard.version \
  58. packaging/dashboard.checksums \
  59. packaging/go.d.version \
  60. packaging/go.d.checksums \
  61. packaging/libwebsockets.version \
  62. packaging/libwebsockets.checksums \
  63. packaging/mosquitto.version \
  64. packaging/mosquitto.checksums \
  65. packaging/bundle-mosquitto.sh \
  66. packaging/bundle-lws.sh \
  67. packaging/installer/README.md \
  68. packaging/installer/UNINSTALL.md \
  69. packaging/installer/UPDATE.md \
  70. netlify.toml \
  71. $(NULL)
  72. # until integrated within build
  73. # should be proper init.d/openrc/systemd usable
  74. dist_noinst_SCRIPTS = \
  75. coverity-scan.sh \
  76. packaging/installer/netdata-updater.sh \
  77. packaging/installer/netdata-uninstaller.sh \
  78. packaging/installer/kickstart.sh \
  79. packaging/installer/kickstart-static64.sh \
  80. packaging/installer/functions.sh \
  81. netdata-installer.sh \
  82. docs/generator/buildhtml.sh \
  83. docs/generator/buildyaml.sh \
  84. docs/generator/checklinks.sh \
  85. docs/generator/requirements.txt \
  86. docs/generator/runtime.txt \
  87. $(NULL)
  88. # -----------------------------------------------------------------------------
  89. # Compile netdata binaries
  90. SUBDIRS += \
  91. backends \
  92. collectors \
  93. daemon \
  94. database \
  95. exporting \
  96. health \
  97. libnetdata \
  98. registry \
  99. streaming \
  100. web \
  101. claim \
  102. aclk \
  103. $(NULL)
  104. AM_CFLAGS = \
  105. $(OPTIONAL_MATH_CFLAGS) \
  106. $(OPTIONAL_NFACCT_CFLAGS) \
  107. $(OPTIONAL_ZLIB_CFLAGS) \
  108. $(OPTIONAL_UUID_CFLAGS) \
  109. $(OPTIONAL_MQTT_CFLAGS) \
  110. $(OPTIONAL_LIBCAP_LIBS) \
  111. $(OPTIONAL_IPMIMONITORING_CFLAGS) \
  112. $(OPTIONAL_CUPS_CFLAGS) \
  113. $(OPTIONAL_XENSTAT_CFLAGS) \
  114. $(NULL)
  115. sbin_PROGRAMS =
  116. plugins_PROGRAMS =
  117. LIBNETDATA_FILES = \
  118. libnetdata/adaptive_resortable_list/adaptive_resortable_list.c \
  119. libnetdata/adaptive_resortable_list/adaptive_resortable_list.h \
  120. libnetdata/config/appconfig.c \
  121. libnetdata/config/appconfig.h \
  122. libnetdata/avl/avl.c \
  123. libnetdata/avl/avl.h \
  124. libnetdata/buffer/buffer.c \
  125. libnetdata/buffer/buffer.h \
  126. libnetdata/clocks/clocks.c \
  127. libnetdata/clocks/clocks.h \
  128. libnetdata/dictionary/dictionary.c \
  129. libnetdata/dictionary/dictionary.h \
  130. libnetdata/ebpf/ebpf.c \
  131. libnetdata/ebpf/ebpf.h \
  132. libnetdata/eval/eval.c \
  133. libnetdata/eval/eval.h \
  134. libnetdata/inlined.h \
  135. libnetdata/libnetdata.c \
  136. libnetdata/libnetdata.h \
  137. libnetdata/required_dummies.h \
  138. libnetdata/locks/locks.c \
  139. libnetdata/locks/locks.h \
  140. libnetdata/log/log.c \
  141. libnetdata/log/log.h \
  142. libnetdata/popen/popen.c \
  143. libnetdata/popen/popen.h \
  144. libnetdata/procfile/procfile.c \
  145. libnetdata/procfile/procfile.h \
  146. libnetdata/os.c \
  147. libnetdata/os.h \
  148. libnetdata/simple_pattern/simple_pattern.c \
  149. libnetdata/simple_pattern/simple_pattern.h \
  150. libnetdata/socket/socket.c \
  151. libnetdata/socket/socket.h \
  152. libnetdata/socket/security.c \
  153. libnetdata/socket/security.h \
  154. libnetdata/statistical/statistical.c \
  155. libnetdata/statistical/statistical.h \
  156. libnetdata/storage_number/storage_number.c \
  157. libnetdata/storage_number/storage_number.h \
  158. libnetdata/threads/threads.c \
  159. libnetdata/threads/threads.h \
  160. libnetdata/url/url.c \
  161. libnetdata/url/url.h \
  162. libnetdata/json/json.c \
  163. libnetdata/json/json.h \
  164. libnetdata/json/jsmn.c \
  165. libnetdata/json/jsmn.h \
  166. libnetdata/health/health.c \
  167. libnetdata/health/health.h \
  168. libnetdata/string/utf8.h \
  169. $(NULL)
  170. APPS_PLUGIN_FILES = \
  171. collectors/apps.plugin/apps_plugin.c \
  172. $(LIBNETDATA_FILES) \
  173. $(NULL)
  174. CHECKS_PLUGIN_FILES = \
  175. collectors/checks.plugin/plugin_checks.c \
  176. collectors/checks.plugin/plugin_checks.h \
  177. $(NULL)
  178. FREEBSD_PLUGIN_FILES = \
  179. collectors/freebsd.plugin/plugin_freebsd.c \
  180. collectors/freebsd.plugin/plugin_freebsd.h \
  181. collectors/freebsd.plugin/freebsd_sysctl.c \
  182. collectors/freebsd.plugin/freebsd_getmntinfo.c \
  183. collectors/freebsd.plugin/freebsd_getifaddrs.c \
  184. collectors/freebsd.plugin/freebsd_devstat.c \
  185. collectors/freebsd.plugin/freebsd_kstat_zfs.c \
  186. collectors/freebsd.plugin/freebsd_ipfw.c \
  187. collectors/proc.plugin/zfs_common.c \
  188. collectors/proc.plugin/zfs_common.h \
  189. $(NULL)
  190. HEALTH_PLUGIN_FILES = \
  191. health/health.c \
  192. health/health.h \
  193. health/health_config.c \
  194. health/health_json.c \
  195. health/health_log.c \
  196. $(NULL)
  197. IDLEJITTER_PLUGIN_FILES = \
  198. collectors/idlejitter.plugin/plugin_idlejitter.c \
  199. collectors/idlejitter.plugin/plugin_idlejitter.h \
  200. $(NULL)
  201. CGROUPS_PLUGIN_FILES = \
  202. collectors/cgroups.plugin/sys_fs_cgroup.c \
  203. collectors/cgroups.plugin/sys_fs_cgroup.h \
  204. $(NULL)
  205. CGROUP_NETWORK_FILES = \
  206. collectors/cgroups.plugin/cgroup-network.c \
  207. $(LIBNETDATA_FILES) \
  208. $(NULL)
  209. DISKSPACE_PLUGIN_FILES = \
  210. collectors/diskspace.plugin/plugin_diskspace.h \
  211. collectors/diskspace.plugin/plugin_diskspace.c \
  212. $(NULL)
  213. FREEIPMI_PLUGIN_FILES = \
  214. collectors/freeipmi.plugin/freeipmi_plugin.c \
  215. $(LIBNETDATA_FILES) \
  216. $(NULL)
  217. CUPS_PLUGIN_FILES = \
  218. collectors/cups.plugin/cups_plugin.c \
  219. $(LIBNETDATA_FILES) \
  220. $(NULL)
  221. NFACCT_PLUGIN_FILES = \
  222. collectors/nfacct.plugin/plugin_nfacct.c \
  223. $(LIBNETDATA_FILES) \
  224. $(NULL)
  225. SLABINFO_PLUGIN_FILES = \
  226. collectors/slabinfo.plugin/slabinfo.c \
  227. $(LIBNETDATA_FILES) \
  228. $(NULL)
  229. XENSTAT_PLUGIN_FILES = \
  230. collectors/xenstat.plugin/xenstat_plugin.c \
  231. $(LIBNETDATA_FILES) \
  232. $(NULL)
  233. PERF_PLUGIN_FILES = \
  234. collectors/perf.plugin/perf_plugin.c \
  235. $(LIBNETDATA_FILES) \
  236. $(NULL)
  237. EBPF_PROCESS_PLUGIN_FILES = \
  238. collectors/ebpf_process.plugin/ebpf_process.c \
  239. collectors/ebpf_process.plugin/ebpf_process.h \
  240. $(LIBNETDATA_FILES) \
  241. $(NULL)
  242. PROC_PLUGIN_FILES = \
  243. collectors/proc.plugin/ipc.c \
  244. collectors/proc.plugin/plugin_proc.c \
  245. collectors/proc.plugin/plugin_proc.h \
  246. collectors/proc.plugin/proc_diskstats.c \
  247. collectors/proc.plugin/proc_mdstat.c \
  248. collectors/proc.plugin/proc_interrupts.c \
  249. collectors/proc.plugin/proc_softirqs.c \
  250. collectors/proc.plugin/proc_loadavg.c \
  251. collectors/proc.plugin/proc_meminfo.c \
  252. collectors/proc.plugin/proc_pagetypeinfo.c \
  253. collectors/proc.plugin/proc_pressure.c \
  254. collectors/proc.plugin/proc_pressure.h \
  255. collectors/proc.plugin/proc_net_dev.c \
  256. collectors/proc.plugin/proc_net_ip_vs_stats.c \
  257. collectors/proc.plugin/proc_net_netstat.c \
  258. collectors/proc.plugin/proc_net_rpc_nfs.c \
  259. collectors/proc.plugin/proc_net_rpc_nfsd.c \
  260. collectors/proc.plugin/proc_net_snmp.c \
  261. collectors/proc.plugin/proc_net_snmp6.c \
  262. collectors/proc.plugin/proc_net_sctp_snmp.c \
  263. collectors/proc.plugin/proc_net_sockstat.c \
  264. collectors/proc.plugin/proc_net_sockstat6.c \
  265. collectors/proc.plugin/proc_net_softnet_stat.c \
  266. collectors/proc.plugin/proc_net_stat_conntrack.c \
  267. collectors/proc.plugin/proc_net_stat_synproxy.c \
  268. collectors/proc.plugin/proc_self_mountinfo.c \
  269. collectors/proc.plugin/proc_self_mountinfo.h \
  270. collectors/proc.plugin/zfs_common.c \
  271. collectors/proc.plugin/zfs_common.h \
  272. collectors/proc.plugin/proc_spl_kstat_zfs.c \
  273. collectors/proc.plugin/proc_stat.c \
  274. collectors/proc.plugin/proc_sys_kernel_random_entropy_avail.c \
  275. collectors/proc.plugin/proc_vmstat.c \
  276. collectors/proc.plugin/proc_uptime.c \
  277. collectors/proc.plugin/sys_kernel_mm_ksm.c \
  278. collectors/proc.plugin/sys_block_zram.c \
  279. collectors/proc.plugin/sys_devices_system_edac_mc.c \
  280. collectors/proc.plugin/sys_devices_system_node.c \
  281. collectors/proc.plugin/sys_fs_btrfs.c \
  282. collectors/proc.plugin/sys_class_power_supply.c \
  283. $(NULL)
  284. TC_PLUGIN_FILES = \
  285. collectors/tc.plugin/plugin_tc.c \
  286. collectors/tc.plugin/plugin_tc.h \
  287. $(NULL)
  288. MACOS_PLUGIN_FILES = \
  289. collectors/macos.plugin/plugin_macos.c \
  290. collectors/macos.plugin/plugin_macos.h \
  291. collectors/macos.plugin/macos_sysctl.c \
  292. collectors/macos.plugin/macos_mach_smi.c \
  293. collectors/macos.plugin/macos_fw.c \
  294. $(NULL)
  295. PLUGINSD_PLUGIN_FILES = \
  296. collectors/plugins.d/plugins_d.c \
  297. collectors/plugins.d/plugins_d.h \
  298. $(NULL)
  299. RRD_PLUGIN_FILES = \
  300. database/rrdcalc.c \
  301. database/rrdcalc.h \
  302. database/rrdcalctemplate.c \
  303. database/rrdcalctemplate.h \
  304. database/rrddim.c \
  305. database/rrddimvar.c \
  306. database/rrddimvar.h \
  307. database/rrdfamily.c \
  308. database/rrdhost.c \
  309. database/rrd.c \
  310. database/rrd.h \
  311. database/rrdset.c \
  312. database/rrdsetvar.c \
  313. database/rrdsetvar.h \
  314. database/rrdvar.c \
  315. database/rrdvar.h \
  316. $(NULL)
  317. if ENABLE_DBENGINE
  318. RRD_PLUGIN_FILES += \
  319. database/engine/rrdengine.c \
  320. database/engine/rrdengine.h \
  321. database/engine/rrddiskprotocol.h \
  322. database/engine/datafile.c \
  323. database/engine/datafile.h \
  324. database/engine/journalfile.c \
  325. database/engine/journalfile.h \
  326. database/engine/rrdenginelib.c \
  327. database/engine/rrdenginelib.h \
  328. database/engine/rrdengineapi.c \
  329. database/engine/rrdengineapi.h \
  330. database/engine/pagecache.c \
  331. database/engine/pagecache.h \
  332. database/engine/rrdenglocking.c \
  333. database/engine/rrdenglocking.h \
  334. $(NULL)
  335. endif
  336. API_PLUGIN_FILES = \
  337. web/api/badges/web_buffer_svg.c \
  338. web/api/badges/web_buffer_svg.h \
  339. web/api/exporters/allmetrics.c \
  340. web/api/exporters/allmetrics.h \
  341. web/api/exporters/shell/allmetrics_shell.c \
  342. web/api/exporters/shell/allmetrics_shell.h \
  343. web/api/queries/average/average.c \
  344. web/api/queries/average/average.h \
  345. web/api/queries/des/des.c \
  346. web/api/queries/des/des.h \
  347. web/api/queries/incremental_sum/incremental_sum.c \
  348. web/api/queries/incremental_sum/incremental_sum.h \
  349. web/api/queries/max/max.c \
  350. web/api/queries/max/max.h \
  351. web/api/queries/median/median.c \
  352. web/api/queries/median/median.h \
  353. web/api/queries/min/min.c \
  354. web/api/queries/min/min.h \
  355. web/api/queries/query.c \
  356. web/api/queries/query.h \
  357. web/api/queries/rrdr.c \
  358. web/api/queries/rrdr.h \
  359. web/api/queries/ses/ses.c \
  360. web/api/queries/ses/ses.h \
  361. web/api/queries/stddev/stddev.c \
  362. web/api/queries/stddev/stddev.h \
  363. web/api/queries/sum/sum.c \
  364. web/api/queries/sum/sum.h \
  365. web/api/formatters/rrd2json.c \
  366. web/api/formatters/rrd2json.h \
  367. web/api/formatters/csv/csv.c \
  368. web/api/formatters/csv/csv.h \
  369. web/api/formatters/json/json.c \
  370. web/api/formatters/json/json.h \
  371. web/api/formatters/ssv/ssv.c \
  372. web/api/formatters/ssv/ssv.h \
  373. web/api/formatters/value/value.c \
  374. web/api/formatters/value/value.h \
  375. web/api/formatters/json_wrapper.c \
  376. web/api/formatters/json_wrapper.h \
  377. web/api/formatters/charts2json.c \
  378. web/api/formatters/charts2json.h \
  379. web/api/formatters/rrdset2json.c \
  380. web/api/formatters/rrdset2json.h \
  381. web/api/health/health_cmdapi.c \
  382. web/api/health/health_cmdapi.h \
  383. web/api/web_api_v1.c \
  384. web/api/web_api_v1.h \
  385. $(NULL)
  386. STREAMING_PLUGIN_FILES = \
  387. streaming/rrdpush.c \
  388. streaming/rrdpush.h \
  389. $(NULL)
  390. REGISTRY_PLUGIN_FILES = \
  391. registry/registry.c \
  392. registry/registry.h \
  393. registry/registry_db.c \
  394. registry/registry_init.c \
  395. registry/registry_internals.c \
  396. registry/registry_internals.h \
  397. registry/registry_log.c \
  398. registry/registry_machine.c \
  399. registry/registry_machine.h \
  400. registry/registry_person.c \
  401. registry/registry_person.h \
  402. registry/registry_url.c \
  403. registry/registry_url.h \
  404. $(NULL)
  405. STATSD_PLUGIN_FILES = \
  406. collectors/statsd.plugin/statsd.c \
  407. collectors/statsd.plugin/statsd.h \
  408. $(NULL)
  409. WEB_PLUGIN_FILES = \
  410. web/server/web_client.c \
  411. web/server/web_client.h \
  412. web/server/web_server.c \
  413. web/server/web_server.h \
  414. web/server/web_client_cache.c \
  415. web/server/web_client_cache.h \
  416. web/server/static/static-threaded.c \
  417. web/server/static/static-threaded.h \
  418. $(NULL)
  419. BACKENDS_PLUGIN_FILES = \
  420. backends/backends.c \
  421. backends/backends.h \
  422. backends/graphite/graphite.c \
  423. backends/graphite/graphite.h \
  424. backends/json/json.c \
  425. backends/json/json.h \
  426. backends/opentsdb/opentsdb.c \
  427. backends/opentsdb/opentsdb.h \
  428. backends/prometheus/backend_prometheus.c \
  429. backends/prometheus/backend_prometheus.h \
  430. $(NULL)
  431. CLAIM_PLUGIN_FILES = \
  432. claim/claim.c \
  433. claim/claim.h \
  434. $(NULL)
  435. ACLK_PLUGIN_FILES = \
  436. aclk/aclk_common.c \
  437. aclk/aclk_common.h \
  438. aclk/agent_cloud_link.c \
  439. aclk/agent_cloud_link.h \
  440. aclk/mqtt.c \
  441. aclk/mqtt.h \
  442. aclk/aclk_lws_wss_client.c \
  443. aclk/aclk_lws_wss_client.h \
  444. aclk/aclk_lws_https_client.c \
  445. aclk/aclk_lws_https_client.h \
  446. $(NULL)
  447. EXPORTING_ENGINE_FILES = \
  448. exporting/exporting_engine.c \
  449. exporting/exporting_engine.h \
  450. exporting/graphite/graphite.c \
  451. exporting/graphite/graphite.h \
  452. exporting/json/json.c \
  453. exporting/json/json.h \
  454. exporting/opentsdb/opentsdb.c \
  455. exporting/opentsdb/opentsdb.h \
  456. exporting/prometheus/prometheus.c \
  457. exporting/prometheus/prometheus.h \
  458. exporting/read_config.c \
  459. exporting/init_connectors.c \
  460. exporting/process_data.c \
  461. exporting/check_filters.c \
  462. exporting/send_data.c \
  463. exporting/send_internal_metrics.c \
  464. $(NULL)
  465. PROMETHEUS_REMOTE_WRITE_EXPORTING_FILES = \
  466. exporting/prometheus/remote_write/remote_write.c \
  467. exporting/prometheus/remote_write/remote_write.h \
  468. exporting/prometheus/remote_write/remote_write_request.cc \
  469. exporting/prometheus/remote_write/remote_write_request.h \
  470. exporting/prometheus/remote_write/remote_write.proto \
  471. $(NULL)
  472. KINESIS_EXPORTING_FILES = \
  473. exporting/aws_kinesis/aws_kinesis.c \
  474. exporting/aws_kinesis/aws_kinesis.h \
  475. exporting/aws_kinesis/aws_kinesis_put_record.cc \
  476. exporting/aws_kinesis/aws_kinesis_put_record.h \
  477. $(NULL)
  478. MONGODB_EXPORTING_FILES = \
  479. exporting/mongodb/mongodb.c \
  480. exporting/mongodb/mongodb.h \
  481. $(NULL)
  482. KINESIS_BACKEND_FILES = \
  483. backends/aws_kinesis/aws_kinesis.c \
  484. backends/aws_kinesis/aws_kinesis.h \
  485. backends/aws_kinesis/aws_kinesis_put_record.cc \
  486. backends/aws_kinesis/aws_kinesis_put_record.h \
  487. $(NULL)
  488. PROMETHEUS_REMOTE_WRITE_BACKEND_FILES = \
  489. backends/prometheus/remote_write/remote_write.cc \
  490. backends/prometheus/remote_write/remote_write.h \
  491. $(NULL)
  492. MONGODB_BACKEND_FILES = \
  493. backends/mongodb/mongodb.c \
  494. backends/mongodb/mongodb.h \
  495. $(NULL)
  496. DAEMON_FILES = \
  497. daemon/common.c \
  498. daemon/common.h \
  499. daemon/daemon.c \
  500. daemon/daemon.h \
  501. daemon/global_statistics.c \
  502. daemon/global_statistics.h \
  503. daemon/main.c \
  504. daemon/main.h \
  505. daemon/signals.c \
  506. daemon/signals.h \
  507. daemon/commands.c \
  508. daemon/commands.h \
  509. daemon/unit_test.c \
  510. daemon/unit_test.h \
  511. $(NULL)
  512. NETDATA_FILES = \
  513. collectors/all.h \
  514. $(DAEMON_FILES) \
  515. $(LIBNETDATA_FILES) \
  516. $(API_PLUGIN_FILES) \
  517. $(BACKENDS_PLUGIN_FILES) \
  518. $(CHECKS_PLUGIN_FILES) \
  519. $(HEALTH_PLUGIN_FILES) \
  520. $(IDLEJITTER_PLUGIN_FILES) \
  521. $(PLUGINSD_PLUGIN_FILES) \
  522. $(REGISTRY_PLUGIN_FILES) \
  523. $(RRD_PLUGIN_FILES) \
  524. $(STREAMING_PLUGIN_FILES) \
  525. $(STATSD_PLUGIN_FILES) \
  526. $(WEB_PLUGIN_FILES) \
  527. $(CLAIM_PLUGIN_FILES) \
  528. $(NULL)
  529. if ENABLE_ACLK
  530. NETDATA_FILES += \
  531. $(ACLK_PLUGIN_FILES) \
  532. $(NULL)
  533. endif
  534. if FREEBSD
  535. NETDATA_FILES += \
  536. $(FREEBSD_PLUGIN_FILES) \
  537. $(NULL)
  538. endif
  539. if MACOS
  540. NETDATA_FILES += \
  541. $(MACOS_PLUGIN_FILES) \
  542. $(NULL)
  543. endif
  544. if LINUX
  545. NETDATA_FILES += \
  546. $(CGROUPS_PLUGIN_FILES) \
  547. $(DISKSPACE_PLUGIN_FILES) \
  548. $(PROC_PLUGIN_FILES) \
  549. $(TC_PLUGIN_FILES) \
  550. $(NULL)
  551. endif
  552. if ENABLE_EXPORTING
  553. NETDATA_FILES += \
  554. $(EXPORTING_ENGINE_FILES) \
  555. $(NULL)
  556. endif
  557. NETDATA_COMMON_LIBS = \
  558. $(OPTIONAL_MATH_LIBS) \
  559. $(OPTIONAL_ZLIB_LIBS) \
  560. $(OPTIONAL_SSL_LIBS) \
  561. $(OPTIONAL_UUID_LIBS) \
  562. $(OPTIONAL_MQTT_LIBS) \
  563. $(OPTIONAL_UV_LIBS) \
  564. $(OPTIONAL_LZ4_LIBS) \
  565. $(OPTIONAL_JUDY_LIBS) \
  566. $(OPTIONAL_SSL_LIBS) \
  567. $(OPTIONAL_JSONC_LIBS) \
  568. $(OPTIONAL_EBPF_LIBS) \
  569. $(NULL)
  570. NETDATACLI_FILES = \
  571. daemon/commands.h \
  572. $(LIBNETDATA_FILES) \
  573. cli/cli.c \
  574. cli/cli.h \
  575. $(NULL)
  576. sbin_PROGRAMS += netdata
  577. netdata_SOURCES = $(NETDATA_FILES)
  578. if ENABLE_ACLK
  579. netdata_LDADD = \
  580. externaldeps/mosquitto/libmosquitto.a \
  581. externaldeps/libwebsockets/libwebsockets.a \
  582. $(NETDATA_COMMON_LIBS) \
  583. $(NULL)
  584. else
  585. netdata_LDADD = \
  586. $(NETDATA_COMMON_LIBS) \
  587. $(NULL)
  588. endif
  589. if ENABLE_CXX_LINKER
  590. netdata_LINK = $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@
  591. else
  592. netdata_LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
  593. endif
  594. sbin_PROGRAMS += netdatacli
  595. netdatacli_SOURCES = $(NETDATACLI_FILES)
  596. netdatacli_LDADD = \
  597. $(NETDATA_COMMON_LIBS) \
  598. $(NULL)
  599. if ENABLE_CXX_LINKER
  600. netdatacli_LINK = $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@
  601. else
  602. netdatacli_LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
  603. endif
  604. if ENABLE_PLUGIN_APPS
  605. plugins_PROGRAMS += apps.plugin
  606. apps_plugin_SOURCES = $(APPS_PLUGIN_FILES)
  607. apps_plugin_LDADD = \
  608. $(NETDATA_COMMON_LIBS) \
  609. $(OPTIONAL_LIBCAP_LIBS) \
  610. $(NULL)
  611. endif
  612. if ENABLE_PLUGIN_CGROUP_NETWORK
  613. plugins_PROGRAMS += cgroup-network
  614. cgroup_network_SOURCES = $(CGROUP_NETWORK_FILES)
  615. cgroup_network_LDADD = \
  616. $(NETDATA_COMMON_LIBS) \
  617. $(NULL)
  618. endif
  619. if ENABLE_PLUGIN_FREEIPMI
  620. plugins_PROGRAMS += freeipmi.plugin
  621. freeipmi_plugin_SOURCES = $(FREEIPMI_PLUGIN_FILES)
  622. freeipmi_plugin_LDADD = \
  623. $(NETDATA_COMMON_LIBS) \
  624. $(OPTIONAL_IPMIMONITORING_LIBS) \
  625. $(NULL)
  626. endif
  627. if ENABLE_PLUGIN_EBPF
  628. plugins_PROGRAMS += ebpf_process.plugin
  629. ebpf_process_plugin_SOURCES = $(EBPF_PROCESS_PLUGIN_FILES)
  630. ebpf_process_plugin_LDADD = \
  631. $(NETDATA_COMMON_LIBS) \
  632. $(NULL)
  633. endif
  634. if ENABLE_PLUGIN_CUPS
  635. plugins_PROGRAMS += cups.plugin
  636. cups_plugin_SOURCES = $(CUPS_PLUGIN_FILES)
  637. cups_plugin_LDADD = \
  638. $(NETDATA_COMMON_LIBS) \
  639. $(OPTIONAL_CUPS_LIBS) \
  640. $(NULL)
  641. endif
  642. if ENABLE_PLUGIN_NFACCT
  643. plugins_PROGRAMS += nfacct.plugin
  644. nfacct_plugin_SOURCES = $(NFACCT_PLUGIN_FILES)
  645. nfacct_plugin_LDADD = \
  646. $(NETDATA_COMMON_LIBS) \
  647. $(OPTIONAL_NFACCT_LIBS) \
  648. $(NULL)
  649. endif
  650. if ENABLE_PLUGIN_XENSTAT
  651. plugins_PROGRAMS += xenstat.plugin
  652. xenstat_plugin_SOURCES = $(XENSTAT_PLUGIN_FILES)
  653. xenstat_plugin_LDADD = \
  654. $(NETDATA_COMMON_LIBS) \
  655. $(OPTIONAL_XENSTAT_LIBS) \
  656. $(NULL)
  657. endif
  658. if ENABLE_PLUGIN_PERF
  659. plugins_PROGRAMS += perf.plugin
  660. perf_plugin_SOURCES = $(PERF_PLUGIN_FILES)
  661. perf_plugin_LDADD = \
  662. $(NETDATA_COMMON_LIBS) \
  663. $(NULL)
  664. endif
  665. if ENABLE_PLUGIN_SLABINFO
  666. plugins_PROGRAMS += slabinfo.plugin
  667. slabinfo_plugin_SOURCES = $(SLABINFO_PLUGIN_FILES)
  668. slabinfo_plugin_LDADD = \
  669. $(NETDATA_COMMON_LIBS) \
  670. $(NULL)
  671. endif
  672. if ENABLE_EXPORTING
  673. if ENABLE_BACKEND_KINESIS
  674. netdata_SOURCES += $(KINESIS_EXPORTING_FILES)
  675. netdata_LDADD += $(OPTIONAL_KINESIS_LIBS)
  676. endif
  677. endif
  678. if ENABLE_BACKEND_KINESIS
  679. netdata_SOURCES += $(KINESIS_BACKEND_FILES)
  680. netdata_LDADD += $(OPTIONAL_KINESIS_LIBS)
  681. endif
  682. if ENABLE_BACKEND_PROMETHEUS_REMOTE_WRITE
  683. if ENABLE_EXPORTING
  684. netdata_SOURCES += $(PROMETHEUS_REMOTE_WRITE_EXPORTING_FILES)
  685. endif
  686. netdata_SOURCES += $(PROMETHEUS_REMOTE_WRITE_BACKEND_FILES)
  687. netdata_LDADD += $(OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS)
  688. BUILT_SOURCES = \
  689. exporting/prometheus/remote_write/remote_write.pb.cc \
  690. exporting/prometheus/remote_write/remote_write.pb.h \
  691. $(NULL)
  692. nodist_netdata_SOURCES = $(BUILT_SOURCES)
  693. exporting/prometheus/remote_write/remote_write.pb.cc \
  694. exporting/prometheus/remote_write/remote_write.pb.h: exporting/prometheus/remote_write/remote_write.proto
  695. $(PROTOC) --proto_path=$(srcdir) --cpp_out=$(builddir) $^
  696. endif
  697. if ENABLE_EXPORTING
  698. if ENABLE_BACKEND_MONGODB
  699. netdata_SOURCES += $(MONGODB_EXPORTING_FILES)
  700. netdata_LDADD += $(OPTIONAL_MONGOC_LIBS)
  701. endif
  702. endif
  703. if ENABLE_BACKEND_MONGODB
  704. netdata_SOURCES += $(MONGODB_BACKEND_FILES)
  705. netdata_LDADD += $(OPTIONAL_MONGOC_LIBS)
  706. endif
  707. if ENABLE_UNITTESTS
  708. check_PROGRAMS = \
  709. libnetdata/tests/str2ld_testdriver \
  710. libnetdata/storage_number/tests/storage_number_testdriver \
  711. exporting/tests/exporting_engine_testdriver \
  712. web/api/tests/web_api_testdriver \
  713. web/api/tests/valid_urls_testdriver \
  714. $(NULL)
  715. TESTS = $(check_PROGRAMS)
  716. web_api_tests_valid_urls_testdriver_LDFLAGS = \
  717. -Wl,--wrap=rrdhost_find_by_hostname \
  718. -Wl,--wrap=finished_web_request_statistics \
  719. -Wl,--wrap=config_get \
  720. -Wl,--wrap=web_client_api_request_v1 \
  721. -Wl,--wrap=rrdhost_find_by_guid \
  722. -Wl,--wrap=rrdset_find_byname \
  723. -Wl,--wrap=rrdset_find \
  724. -Wl,--wrap=rrdpush_receiver_thread_spawn \
  725. -Wl,--wrap=debug_int \
  726. -Wl,--wrap=error_int \
  727. -Wl,--wrap=info_int \
  728. -Wl,--wrap=fatal_int \
  729. -Wl,--wrap=mysendfile \
  730. -DREMOVE_MYSENDFILE \
  731. $(TEST_LDFLAGS) \
  732. $(NULL)
  733. web_api_tests_valid_urls_testdriver_SOURCES = \
  734. web/api/tests/valid_urls.c \
  735. web/server/web_client.c \
  736. $(LIBNETDATA_FILES) \
  737. $(NULL)
  738. web_api_tests_valid_urls_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  739. web_api_tests_web_api_testdriver_LDFLAGS = \
  740. -Wl,--wrap=rrdhost_find_by_hostname \
  741. -Wl,--wrap=finished_web_request_statistics \
  742. -Wl,--wrap=config_get \
  743. -Wl,--wrap=web_client_api_request_v1 \
  744. -Wl,--wrap=rrdhost_find_by_guid \
  745. -Wl,--wrap=rrdset_find_byname \
  746. -Wl,--wrap=rrdset_find \
  747. -Wl,--wrap=rrdpush_receiver_thread_spawn \
  748. -Wl,--wrap=debug_int \
  749. -Wl,--wrap=error_int \
  750. -Wl,--wrap=info_int \
  751. -Wl,--wrap=fatal_int \
  752. $(TEST_LDFLAGS) \
  753. $(NULL)
  754. web_api_tests_web_api_testdriver_SOURCES = \
  755. web/api/tests/web_api.c \
  756. web/server/web_client.c \
  757. $(LIBNETDATA_FILES) \
  758. $(NULL)
  759. web_api_tests_web_api_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  760. libnetdata_tests_str2ld_testdriver_SOURCES = \
  761. libnetdata/tests/test_str2ld.c \
  762. $(LIBNETDATA_FILES) \
  763. $(NULL)
  764. libnetdata_tests_str2ld_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  765. libnetdata_storage_number_tests_storage_number_testdriver_SOURCES = \
  766. libnetdata/storage_number/tests/test_storage_number.c \
  767. $(LIBNETDATA_FILES) \
  768. $(NULL)
  769. libnetdata_storage_number_tests_storage_number_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  770. EXPORTING_ENGINE_TEST_FILES = \
  771. exporting/tests/test_exporting_engine.c \
  772. exporting/tests/test_exporting_engine.h \
  773. exporting/tests/exporting_fixtures.c \
  774. exporting/tests/exporting_doubles.c \
  775. exporting/tests/netdata_doubles.c \
  776. exporting/tests/system_doubles.c \
  777. $(NULL)
  778. exporting_tests_exporting_engine_testdriver_SOURCES = \
  779. $(EXPORTING_ENGINE_TEST_FILES) \
  780. $(EXPORTING_ENGINE_FILES) \
  781. $(LIBNETDATA_FILES) \
  782. $(NULL)
  783. exporting_tests_exporting_engine_testdriver_CFLAGS = \
  784. $(AM_CFLAGS) \
  785. -DUNIT_TESTING \
  786. $(NULL)
  787. exporting_tests_exporting_engine_testdriver_LDFLAGS = \
  788. -Wl,--wrap=read_exporting_config \
  789. -Wl,--wrap=init_connectors \
  790. -Wl,--wrap=mark_scheduled_instances \
  791. -Wl,--wrap=rrdhost_is_exportable \
  792. -Wl,--wrap=rrdset_is_exportable \
  793. -Wl,--wrap=exporting_calculate_value_from_stored_data \
  794. -Wl,--wrap=prepare_buffers \
  795. -Wl,--wrap=notify_workers \
  796. -Wl,--wrap=send_internal_metrics \
  797. -Wl,--wrap=now_realtime_sec \
  798. -Wl,--wrap=uv_thread_set_name_np \
  799. -Wl,--wrap=uv_thread_create \
  800. -Wl,--wrap=uv_mutex_lock \
  801. -Wl,--wrap=uv_mutex_unlock \
  802. -Wl,--wrap=uv_cond_signal \
  803. -Wl,--wrap=uv_cond_wait \
  804. -Wl,--wrap=strdupz \
  805. -Wl,--wrap=info_int \
  806. -Wl,--wrap=recv \
  807. -Wl,--wrap=send \
  808. -Wl,--wrap=connect_to_one_of \
  809. $(TEST_LDFLAGS) \
  810. $(NULL)
  811. exporting_tests_exporting_engine_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  812. if ENABLE_BACKEND_PROMETHEUS_REMOTE_WRITE
  813. exporting_tests_exporting_engine_testdriver_SOURCES += $(PROMETHEUS_REMOTE_WRITE_EXPORTING_FILES)
  814. exporting_tests_exporting_engine_testdriver_LDADD += $(OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS)
  815. exporting_tests_exporting_engine_testdriver_LDFLAGS += \
  816. -Wl,--wrap=init_write_request \
  817. -Wl,--wrap=add_host_info \
  818. -Wl,--wrap=add_label \
  819. -Wl,--wrap=add_metric \
  820. $(NULL)
  821. nodist_exporting_tests_exporting_engine_testdriver_SOURCES = $(BUILT_SOURCES)
  822. endif
  823. if ENABLE_BACKEND_KINESIS
  824. exporting_tests_exporting_engine_testdriver_SOURCES += $(KINESIS_EXPORTING_FILES)
  825. exporting_tests_exporting_engine_testdriver_LDADD += $(OPTIONAL_KINESIS_LIBS)
  826. exporting_tests_exporting_engine_testdriver_LDFLAGS += \
  827. -Wl,--wrap=aws_sdk_init \
  828. -Wl,--wrap=kinesis_init \
  829. -Wl,--wrap=kinesis_put_record \
  830. -Wl,--wrap=kinesis_get_result \
  831. $(NULL)
  832. endif
  833. if ENABLE_BACKEND_MONGODB
  834. exporting_tests_exporting_engine_testdriver_SOURCES += $(MONGODB_EXPORTING_FILES)
  835. exporting_tests_exporting_engine_testdriver_LDADD += $(OPTIONAL_MONGOC_LIBS)
  836. exporting_tests_exporting_engine_testdriver_LDFLAGS += \
  837. -Wl,--wrap=mongoc_init \
  838. -Wl,--wrap=mongoc_uri_new_with_error \
  839. -Wl,--wrap=mongoc_uri_get_option_as_int32 \
  840. -Wl,--wrap=mongoc_uri_set_option_as_int32 \
  841. -Wl,--wrap=mongoc_client_new_from_uri \
  842. -Wl,--wrap=mongoc_client_set_appname \
  843. -Wl,--wrap=mongoc_client_get_collection \
  844. -Wl,--wrap=mongoc_uri_destroy \
  845. -Wl,--wrap=mongoc_collection_insert_many \
  846. $(NULL)
  847. endif
  848. endif