Makefile.am 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  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. EXTRA_DIST = \
  16. .gitignore \
  17. .codacy.yml \
  18. .codeclimate.yml \
  19. .csslintrc \
  20. .eslintignore \
  21. .eslintrc \
  22. .lgtm.yml \
  23. .travis \
  24. .github/CODEOWNERS \
  25. build/m4/jemalloc.m4 \
  26. build/m4/ax_c___atomic.m4 \
  27. build/m4/ax_check_enable_debug.m4 \
  28. build/m4/ax_c_mallinfo.m4 \
  29. build/m4/ax_gcc_func_attribute.m4 \
  30. build/m4/ax_check_compile_flag.m4 \
  31. build/m4/ax_c_statement_expressions.m4 \
  32. build/m4/ax_pthread.m4 \
  33. build/m4/ax_c_lto.m4 \
  34. build/m4/ax_c_mallopt.m4 \
  35. build/m4/tcmalloc.m4 \
  36. build/m4/ax_c__generic.m4 \
  37. README.md \
  38. CONTRIBUTORS.md \
  39. CODE_OF_CONDUCT.md \
  40. LICENSE \
  41. REDISTRIBUTED.md \
  42. CONTRIBUTING.md \
  43. $(NULL)
  44. SUBDIRS = \
  45. diagrams \
  46. system \
  47. tests \
  48. $(NULL)
  49. dist_noinst_DATA= \
  50. cppcheck.sh \
  51. configs.signatures \
  52. contrib \
  53. netdata.cppcheck \
  54. netdata.spec \
  55. package.json \
  56. docs \
  57. packaging/version \
  58. packaging/go.d.checksums \
  59. packaging/installer/README.md \
  60. packaging/installer/UNINSTALL.md \
  61. packaging/installer/UPDATE.md \
  62. netlify.toml \
  63. $(NULL)
  64. # until integrated within build
  65. # should be proper init.d/openrc/systemd usable
  66. dist_noinst_SCRIPTS= \
  67. coverity-scan.sh \
  68. coverity-install.sh \
  69. packaging/installer/netdata-updater.sh \
  70. packaging/installer/kickstart.sh \
  71. packaging/installer/kickstart-static64.sh \
  72. packaging/installer/functions.sh \
  73. netdata-installer.sh \
  74. docs/generator/buildhtml.sh \
  75. docs/generator/buildyaml.sh \
  76. docs/generator/checklinks.sh \
  77. docs/generator/requirements.txt \
  78. docs/generator/runtime.txt \
  79. $(NULL)
  80. # -----------------------------------------------------------------------------
  81. # Compile netdata binaries
  82. SUBDIRS += \
  83. backends \
  84. collectors \
  85. daemon \
  86. database \
  87. health \
  88. libnetdata \
  89. registry \
  90. streaming \
  91. web \
  92. $(NULL)
  93. AM_CFLAGS = \
  94. $(OPTIONAL_MATH_CFLAGS) \
  95. $(OPTIONAL_NFACCT_CLFAGS) \
  96. $(OPTIONAL_ZLIB_CFLAGS) \
  97. $(OPTIONAL_UUID_CFLAGS) \
  98. $(OPTIONAL_LIBCAP_LIBS) \
  99. $(OPTIONAL_IPMIMONITORING_CFLAGS) \
  100. $(OPTIONAL_CUPS_CFLAGS) \
  101. $(NULL)
  102. sbin_PROGRAMS =
  103. dist_cache_DATA = packaging/installer/.keep
  104. dist_varlib_DATA = packaging/installer/.keep
  105. dist_registry_DATA = packaging/installer/.keep
  106. dist_log_DATA = packaging/installer/.keep
  107. plugins_PROGRAMS =
  108. LIBNETDATA_FILES = \
  109. libnetdata/adaptive_resortable_list/adaptive_resortable_list.c \
  110. libnetdata/adaptive_resortable_list/adaptive_resortable_list.h \
  111. libnetdata/config/appconfig.c \
  112. libnetdata/config/appconfig.h \
  113. libnetdata/avl/avl.c \
  114. libnetdata/avl/avl.h \
  115. libnetdata/buffer/buffer.c \
  116. libnetdata/buffer/buffer.h \
  117. libnetdata/clocks/clocks.c \
  118. libnetdata/clocks/clocks.h \
  119. libnetdata/dictionary/dictionary.c \
  120. libnetdata/dictionary/dictionary.h \
  121. libnetdata/eval/eval.c \
  122. libnetdata/eval/eval.h \
  123. libnetdata/inlined.h \
  124. libnetdata/libnetdata.c \
  125. libnetdata/libnetdata.h \
  126. libnetdata/locks/locks.c \
  127. libnetdata/locks/locks.h \
  128. libnetdata/log/log.c \
  129. libnetdata/log/log.h \
  130. libnetdata/popen/popen.c \
  131. libnetdata/popen/popen.h \
  132. libnetdata/procfile/procfile.c \
  133. libnetdata/procfile/procfile.h \
  134. libnetdata/os.c \
  135. libnetdata/os.h \
  136. libnetdata/simple_pattern/simple_pattern.c \
  137. libnetdata/simple_pattern/simple_pattern.h \
  138. libnetdata/socket/socket.c \
  139. libnetdata/socket/socket.h \
  140. libnetdata/statistical/statistical.c \
  141. libnetdata/statistical/statistical.h \
  142. libnetdata/storage_number/storage_number.c \
  143. libnetdata/storage_number/storage_number.h \
  144. libnetdata/threads/threads.c \
  145. libnetdata/threads/threads.h \
  146. libnetdata/url/url.c \
  147. libnetdata/url/url.h \
  148. $(NULL)
  149. APPS_PLUGIN_FILES = \
  150. collectors/apps.plugin/apps_plugin.c \
  151. $(LIBNETDATA_FILES) \
  152. $(NULL)
  153. CHECKS_PLUGIN_FILES = \
  154. collectors/checks.plugin/plugin_checks.c \
  155. collectors/checks.plugin/plugin_checks.h \
  156. $(NULL)
  157. FREEBSD_PLUGIN_FILES = \
  158. collectors/freebsd.plugin/plugin_freebsd.c \
  159. collectors/freebsd.plugin/plugin_freebsd.h \
  160. collectors/freebsd.plugin/freebsd_sysctl.c \
  161. collectors/freebsd.plugin/freebsd_getmntinfo.c \
  162. collectors/freebsd.plugin/freebsd_getifaddrs.c \
  163. collectors/freebsd.plugin/freebsd_devstat.c \
  164. collectors/freebsd.plugin/freebsd_kstat_zfs.c \
  165. collectors/freebsd.plugin/freebsd_ipfw.c \
  166. collectors/proc.plugin/zfs_common.c \
  167. collectors/proc.plugin/zfs_common.h \
  168. $(NULL)
  169. HEALTH_PLUGIN_FILES = \
  170. health/health.c \
  171. health/health.h \
  172. health/health_config.c \
  173. health/health_json.c \
  174. health/health_log.c \
  175. $(NULL)
  176. IDLEJITTER_PLUGIN_FILES = \
  177. collectors/idlejitter.plugin/plugin_idlejitter.c \
  178. collectors/idlejitter.plugin/plugin_idlejitter.h \
  179. $(NULL)
  180. CGROUPS_PLUGIN_FILES = \
  181. collectors/cgroups.plugin/sys_fs_cgroup.c \
  182. collectors/cgroups.plugin/sys_fs_cgroup.h \
  183. $(NULL)
  184. CGROUP_NETWORK_FILES = \
  185. collectors/cgroups.plugin/cgroup-network.c \
  186. $(LIBNETDATA_FILES) \
  187. $(NULL)
  188. DISKSPACE_PLUGIN_FILES = \
  189. collectors/diskspace.plugin/plugin_diskspace.h \
  190. collectors/diskspace.plugin/plugin_diskspace.c \
  191. $(NULL)
  192. FREEIPMI_PLUGIN_FILES = \
  193. collectors/freeipmi.plugin/freeipmi_plugin.c \
  194. $(LIBNETDATA_FILES) \
  195. $(NULL)
  196. CUPS_PLUGIN_FILES = \
  197. collectors/cups.plugin/cups_plugin.c \
  198. $(LIBNETDATA_FILES) \
  199. $(NULL)
  200. NFACCT_PLUGIN_FILES = \
  201. collectors/nfacct.plugin/plugin_nfacct.c \
  202. $(LIBNETDATA_FILES) \
  203. $(NULL)
  204. PROC_PLUGIN_FILES = \
  205. collectors/proc.plugin/ipc.c \
  206. collectors/proc.plugin/plugin_proc.c \
  207. collectors/proc.plugin/plugin_proc.h \
  208. collectors/proc.plugin/proc_diskstats.c \
  209. collectors/proc.plugin/proc_mdstat.c \
  210. collectors/proc.plugin/proc_interrupts.c \
  211. collectors/proc.plugin/proc_softirqs.c \
  212. collectors/proc.plugin/proc_loadavg.c \
  213. collectors/proc.plugin/proc_meminfo.c \
  214. collectors/proc.plugin/proc_net_dev.c \
  215. collectors/proc.plugin/proc_net_ip_vs_stats.c \
  216. collectors/proc.plugin/proc_net_netstat.c \
  217. collectors/proc.plugin/proc_net_rpc_nfs.c \
  218. collectors/proc.plugin/proc_net_rpc_nfsd.c \
  219. collectors/proc.plugin/proc_net_snmp.c \
  220. collectors/proc.plugin/proc_net_snmp6.c \
  221. collectors/proc.plugin/proc_net_sctp_snmp.c \
  222. collectors/proc.plugin/proc_net_sockstat.c \
  223. collectors/proc.plugin/proc_net_sockstat6.c \
  224. collectors/proc.plugin/proc_net_softnet_stat.c \
  225. collectors/proc.plugin/proc_net_stat_conntrack.c \
  226. collectors/proc.plugin/proc_net_stat_synproxy.c \
  227. collectors/proc.plugin/proc_self_mountinfo.c \
  228. collectors/proc.plugin/proc_self_mountinfo.h \
  229. collectors/proc.plugin/zfs_common.c \
  230. collectors/proc.plugin/zfs_common.h \
  231. collectors/proc.plugin/proc_spl_kstat_zfs.c \
  232. collectors/proc.plugin/proc_stat.c \
  233. collectors/proc.plugin/proc_sys_kernel_random_entropy_avail.c \
  234. collectors/proc.plugin/proc_vmstat.c \
  235. collectors/proc.plugin/proc_uptime.c \
  236. collectors/proc.plugin/sys_kernel_mm_ksm.c \
  237. collectors/proc.plugin/sys_devices_system_edac_mc.c \
  238. collectors/proc.plugin/sys_devices_system_node.c \
  239. collectors/proc.plugin/sys_fs_btrfs.c \
  240. collectors/proc.plugin/sys_class_power_supply.c \
  241. $(NULL)
  242. TC_PLUGIN_FILES = \
  243. collectors/tc.plugin/plugin_tc.c \
  244. collectors/tc.plugin/plugin_tc.h \
  245. $(NULL)
  246. MACOS_PLUGIN_FILES = \
  247. collectors/macos.plugin/plugin_macos.c \
  248. collectors/macos.plugin/plugin_macos.h \
  249. collectors/macos.plugin/macos_sysctl.c \
  250. collectors/macos.plugin/macos_mach_smi.c \
  251. collectors/macos.plugin/macos_fw.c \
  252. $(NULL)
  253. PLUGINSD_PLUGIN_FILES = \
  254. collectors/plugins.d/plugins_d.c \
  255. collectors/plugins.d/plugins_d.h \
  256. $(NULL)
  257. RRD_PLUGIN_FILES = \
  258. database/rrdcalc.c \
  259. database/rrdcalc.h \
  260. database/rrdcalctemplate.c \
  261. database/rrdcalctemplate.h \
  262. database/rrddim.c \
  263. database/rrddimvar.c \
  264. database/rrddimvar.h \
  265. database/rrdfamily.c \
  266. database/rrdhost.c \
  267. database/rrd.c \
  268. database/rrd.h \
  269. database/rrdset.c \
  270. database/rrdsetvar.c \
  271. database/rrdsetvar.h \
  272. database/rrdvar.c \
  273. database/rrdvar.h \
  274. $(NULL)
  275. API_PLUGIN_FILES = \
  276. web/api/badges/web_buffer_svg.c \
  277. web/api/badges/web_buffer_svg.h \
  278. web/api/exporters/allmetrics.c \
  279. web/api/exporters/allmetrics.h \
  280. web/api/exporters/shell/allmetrics_shell.c \
  281. web/api/exporters/shell/allmetrics_shell.h \
  282. web/api/queries/average/average.c \
  283. web/api/queries/average/average.h \
  284. web/api/queries/des/des.c \
  285. web/api/queries/des/des.h \
  286. web/api/queries/incremental_sum/incremental_sum.c \
  287. web/api/queries/incremental_sum/incremental_sum.h \
  288. web/api/queries/max/max.c \
  289. web/api/queries/max/max.h \
  290. web/api/queries/median/median.c \
  291. web/api/queries/median/median.h \
  292. web/api/queries/min/min.c \
  293. web/api/queries/min/min.h \
  294. web/api/queries/query.c \
  295. web/api/queries/query.h \
  296. web/api/queries/rrdr.c \
  297. web/api/queries/rrdr.h \
  298. web/api/queries/ses/ses.c \
  299. web/api/queries/ses/ses.h \
  300. web/api/queries/stddev/stddev.c \
  301. web/api/queries/stddev/stddev.h \
  302. web/api/queries/sum/sum.c \
  303. web/api/queries/sum/sum.h \
  304. web/api/formatters/rrd2json.c \
  305. web/api/formatters/rrd2json.h \
  306. web/api/formatters/csv/csv.c \
  307. web/api/formatters/csv/csv.h \
  308. web/api/formatters/json/json.c \
  309. web/api/formatters/json/json.h \
  310. web/api/formatters/ssv/ssv.c \
  311. web/api/formatters/ssv/ssv.h \
  312. web/api/formatters/value/value.c \
  313. web/api/formatters/value/value.h \
  314. web/api/formatters/json_wrapper.c \
  315. web/api/formatters/json_wrapper.h \
  316. web/api/formatters/charts2json.c \
  317. web/api/formatters/charts2json.h \
  318. web/api/formatters/rrdset2json.c \
  319. web/api/formatters/rrdset2json.h \
  320. web/api/health/health_cmdapi.c \
  321. web/api/health/health_cmdapi.h \
  322. web/api/web_api_v1.c \
  323. web/api/web_api_v1.h \
  324. $(NULL)
  325. STREAMING_PLUGIN_FILES = \
  326. streaming/rrdpush.c \
  327. streaming/rrdpush.h \
  328. $(NULL)
  329. REGISTRY_PLUGIN_FILES = \
  330. registry/registry.c \
  331. registry/registry.h \
  332. registry/registry_db.c \
  333. registry/registry_init.c \
  334. registry/registry_internals.c \
  335. registry/registry_internals.h \
  336. registry/registry_log.c \
  337. registry/registry_machine.c \
  338. registry/registry_machine.h \
  339. registry/registry_person.c \
  340. registry/registry_person.h \
  341. registry/registry_url.c \
  342. registry/registry_url.h \
  343. $(NULL)
  344. STATSD_PLUGIN_FILES = \
  345. collectors/statsd.plugin/statsd.c \
  346. collectors/statsd.plugin/statsd.h \
  347. $(NULL)
  348. WEB_PLUGIN_FILES = \
  349. web/server/web_client.c \
  350. web/server/web_client.h \
  351. web/server/web_server.c \
  352. web/server/web_server.h \
  353. web/server/web_client_cache.c \
  354. web/server/web_client_cache.h \
  355. web/server/static/static-threaded.c \
  356. web/server/static/static-threaded.h \
  357. $(NULL)
  358. BACKENDS_PLUGIN_FILES = \
  359. backends/backends.c \
  360. backends/backends.h \
  361. backends/graphite/graphite.c \
  362. backends/graphite/graphite.h \
  363. backends/json/json.c \
  364. backends/json/json.h \
  365. backends/opentsdb/opentsdb.c \
  366. backends/opentsdb/opentsdb.h \
  367. backends/prometheus/backend_prometheus.c \
  368. backends/prometheus/backend_prometheus.h \
  369. $(NULL)
  370. DAEMON_FILES = \
  371. daemon/common.c \
  372. daemon/common.h \
  373. daemon/daemon.c \
  374. daemon/daemon.h \
  375. daemon/global_statistics.c \
  376. daemon/global_statistics.h \
  377. daemon/main.c \
  378. daemon/main.h \
  379. daemon/signals.c \
  380. daemon/signals.h \
  381. daemon/unit_test.c \
  382. daemon/unit_test.h \
  383. $(NULL)
  384. NETDATA_FILES = \
  385. collectors/all.h \
  386. $(DAEMON_FILES) \
  387. $(LIBNETDATA_FILES) \
  388. $(API_PLUGIN_FILES) \
  389. $(BACKENDS_PLUGIN_FILES) \
  390. $(CHECKS_PLUGIN_FILES) \
  391. $(HEALTH_PLUGIN_FILES) \
  392. $(IDLEJITTER_PLUGIN_FILES) \
  393. $(PLUGINSD_PLUGIN_FILES) \
  394. $(REGISTRY_PLUGIN_FILES) \
  395. $(RRD_PLUGIN_FILES) \
  396. $(STREAMING_PLUGIN_FILES) \
  397. $(STATSD_PLUGIN_FILES) \
  398. $(WEB_PLUGIN_FILES) \
  399. $(NULL)
  400. if FREEBSD
  401. NETDATA_FILES += \
  402. $(FREEBSD_PLUGIN_FILES) \
  403. $(NULL)
  404. endif
  405. if MACOS
  406. NETDATA_FILES += \
  407. $(MACOS_PLUGIN_FILES) \
  408. $(NULL)
  409. endif
  410. if LINUX
  411. NETDATA_FILES += \
  412. $(CGROUPS_PLUGIN_FILES) \
  413. $(DISKSPACE_PLUGIN_FILES) \
  414. $(PROC_PLUGIN_FILES) \
  415. $(TC_PLUGIN_FILES) \
  416. $(NULL)
  417. endif
  418. NETDATA_COMMON_LIBS = \
  419. $(OPTIONAL_MATH_LIBS) \
  420. $(OPTIONAL_ZLIB_LIBS) \
  421. $(OPTIONAL_UUID_LIBS) \
  422. $(NULL)
  423. sbin_PROGRAMS += netdata
  424. netdata_SOURCES = $(NETDATA_FILES)
  425. netdata_LDADD = \
  426. $(NETDATA_COMMON_LIBS) \
  427. $(NULL)
  428. if ENABLE_PLUGIN_APPS
  429. plugins_PROGRAMS += apps.plugin
  430. apps_plugin_SOURCES = $(APPS_PLUGIN_FILES)
  431. apps_plugin_LDADD = \
  432. $(NETDATA_COMMON_LIBS) \
  433. $(OPTIONAL_LIBCAP_LIBS) \
  434. $(NULL)
  435. endif
  436. if ENABLE_PLUGIN_CGROUP_NETWORK
  437. plugins_PROGRAMS += cgroup-network
  438. cgroup_network_SOURCES = $(CGROUP_NETWORK_FILES)
  439. cgroup_network_LDADD = \
  440. $(NETDATA_COMMON_LIBS) \
  441. $(NULL)
  442. endif
  443. if ENABLE_PLUGIN_FREEIPMI
  444. plugins_PROGRAMS += freeipmi.plugin
  445. freeipmi_plugin_SOURCES = $(FREEIPMI_PLUGIN_FILES)
  446. freeipmi_plugin_LDADD = \
  447. $(NETDATA_COMMON_LIBS) \
  448. $(OPTIONAL_IPMIMONITORING_LIBS) \
  449. $(NULL)
  450. endif
  451. if ENABLE_PLUGIN_CUPS
  452. plugins_PROGRAMS += cups.plugin
  453. cups_plugin_SOURCES = $(CUPS_PLUGIN_FILES)
  454. cups_plugin_LDADD = \
  455. $(NETDATA_COMMON_LIBS) \
  456. $(OPTIONAL_CUPS_LIBS) \
  457. $(NULL)
  458. endif
  459. if ENABLE_PLUGIN_NFACCT
  460. plugins_PROGRAMS += nfacct.plugin
  461. nfacct_plugin_SOURCES = $(NFACCT_PLUGIN_FILES)
  462. nfacct_plugin_LDADD = \
  463. $(NETDATA_COMMON_LIBS) \
  464. $(OPTIONAL_NFACCT_LIBS) \
  465. $(NULL)
  466. endif