Makefile.am 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. if !HTOP_PCP
  2. bin_PROGRAMS = htop
  3. myhtopplatprogram = htop.c
  4. else
  5. bin_PROGRAMS = pcp-htop
  6. myhtopplatprogram = pcp-htop.c
  7. endif
  8. dist_man_MANS = htop.1
  9. EXTRA_DIST = \
  10. $(dist_man_MANS) \
  11. autogen.sh \
  12. htop.desktop \
  13. htop.png \
  14. htop.svg \
  15. build-aux/compile \
  16. build-aux/depcomp \
  17. build-aux/install-sh \
  18. build-aux/missing
  19. applicationsdir = $(datadir)/applications
  20. applications_DATA = htop.desktop
  21. pixmapdir = $(datadir)/pixmaps
  22. pixmap_DATA = htop.png
  23. appicondir = $(datadir)/icons/hicolor/scalable/apps
  24. appicon_DATA = htop.svg
  25. AM_CFLAGS += -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR="\"$(sysconfdir)\"" -I"$(top_srcdir)/$(my_htop_platform)"
  26. AM_LDFLAGS =
  27. myhtopsources = \
  28. Action.c \
  29. Affinity.c \
  30. AffinityPanel.c \
  31. AvailableColumnsPanel.c \
  32. AvailableMetersPanel.c \
  33. BatteryMeter.c \
  34. CategoriesPanel.c \
  35. ClockMeter.c \
  36. ColorsPanel.c \
  37. ColumnsPanel.c \
  38. CommandLine.c \
  39. CommandScreen.c \
  40. Compat.c \
  41. CPUMeter.c \
  42. CRT.c \
  43. DateMeter.c \
  44. DateTimeMeter.c \
  45. DiskIOMeter.c \
  46. DisplayOptionsPanel.c \
  47. DynamicColumn.c \
  48. DynamicMeter.c \
  49. DynamicScreen.c \
  50. EnvScreen.c \
  51. FileDescriptorMeter.c \
  52. FunctionBar.c \
  53. Hashtable.c \
  54. Header.c \
  55. HeaderOptionsPanel.c \
  56. HostnameMeter.c \
  57. IncSet.c \
  58. InfoScreen.c \
  59. ListItem.c \
  60. LoadAverageMeter.c \
  61. Machine.c \
  62. MainPanel.c \
  63. MemoryMeter.c \
  64. MemorySwapMeter.c \
  65. Meter.c \
  66. MetersPanel.c \
  67. NetworkIOMeter.c \
  68. Object.c \
  69. OpenFilesScreen.c \
  70. OptionItem.c \
  71. Panel.c \
  72. Process.c \
  73. ProcessLocksScreen.c \
  74. ProcessTable.c \
  75. Row.c \
  76. RichString.c \
  77. Scheduling.c \
  78. ScreenManager.c \
  79. ScreensPanel.c \
  80. ScreenTabsPanel.c \
  81. Settings.c \
  82. SignalsPanel.c \
  83. SwapMeter.c \
  84. SysArchMeter.c \
  85. Table.c \
  86. TasksMeter.c \
  87. TraceScreen.c \
  88. UptimeMeter.c \
  89. UsersTable.c \
  90. Vector.c \
  91. XUtils.c
  92. myhtopheaders = \
  93. Action.h \
  94. Affinity.h \
  95. AffinityPanel.h \
  96. AvailableColumnsPanel.h \
  97. AvailableMetersPanel.h \
  98. BatteryMeter.h \
  99. CPUMeter.h \
  100. CRT.h \
  101. CategoriesPanel.h \
  102. ClockMeter.h \
  103. ColorsPanel.h \
  104. ColumnsPanel.h \
  105. CommandLine.h \
  106. CommandScreen.h \
  107. Compat.h \
  108. DateMeter.h \
  109. DateTimeMeter.h \
  110. DiskIOMeter.h \
  111. DisplayOptionsPanel.h \
  112. DynamicColumn.h \
  113. DynamicMeter.h \
  114. DynamicScreen.h \
  115. EnvScreen.h \
  116. FileDescriptorMeter.h \
  117. FunctionBar.h \
  118. Hashtable.h \
  119. Header.h \
  120. HeaderLayout.h \
  121. HeaderOptionsPanel.h \
  122. HostnameMeter.h \
  123. IncSet.h \
  124. InfoScreen.h \
  125. ListItem.h \
  126. LoadAverageMeter.h \
  127. Machine.h \
  128. Macros.h \
  129. MainPanel.h \
  130. MemoryMeter.h \
  131. MemorySwapMeter.h \
  132. Meter.h \
  133. MeterMode.h \
  134. MetersPanel.h \
  135. NetworkIOMeter.h \
  136. Object.h \
  137. OpenFilesScreen.h \
  138. OptionItem.h \
  139. Panel.h \
  140. Process.h \
  141. ProcessLocksScreen.h \
  142. ProcessTable.h \
  143. ProvideCurses.h \
  144. ProvideTerm.h \
  145. RichString.h \
  146. Row.h \
  147. RowField.h \
  148. Scheduling.h \
  149. ScreenManager.h \
  150. ScreensPanel.h \
  151. ScreenTabsPanel.h \
  152. Settings.h \
  153. SignalsPanel.h \
  154. SwapMeter.h \
  155. SysArchMeter.h \
  156. Table.h \
  157. TasksMeter.h \
  158. TraceScreen.h \
  159. UptimeMeter.h \
  160. UsersTable.h \
  161. Vector.h \
  162. XUtils.h
  163. # Linux
  164. # -----
  165. linux_platform_headers = \
  166. generic/gettime.h \
  167. generic/hostname.h \
  168. generic/uname.h \
  169. linux/CGroupUtils.h \
  170. linux/GPU.h \
  171. linux/GPUMeter.h \
  172. linux/HugePageMeter.h \
  173. linux/IOPriority.h \
  174. linux/IOPriorityPanel.h \
  175. linux/LibSensors.h \
  176. linux/LinuxMachine.h \
  177. linux/LinuxProcess.h \
  178. linux/LinuxProcessTable.h \
  179. linux/Platform.h \
  180. linux/PressureStallMeter.h \
  181. linux/ProcessField.h \
  182. linux/SELinuxMeter.h \
  183. linux/SystemdMeter.h \
  184. linux/ZramMeter.h \
  185. linux/ZramStats.h \
  186. linux/ZswapStats.h \
  187. zfs/ZfsArcMeter.h \
  188. zfs/ZfsArcStats.h \
  189. zfs/ZfsCompressedArcMeter.h
  190. linux_platform_sources = \
  191. generic/gettime.c \
  192. generic/hostname.c \
  193. generic/uname.c \
  194. linux/CGroupUtils.c \
  195. linux/GPU.c \
  196. linux/GPUMeter.c \
  197. linux/HugePageMeter.c \
  198. linux/IOPriorityPanel.c \
  199. linux/LibSensors.c \
  200. linux/LinuxMachine.c \
  201. linux/LinuxProcess.c \
  202. linux/LinuxProcessTable.c \
  203. linux/Platform.c \
  204. linux/PressureStallMeter.c \
  205. linux/SELinuxMeter.c \
  206. linux/SystemdMeter.c \
  207. linux/ZramMeter.c \
  208. zfs/ZfsArcMeter.c \
  209. zfs/ZfsCompressedArcMeter.c
  210. if HAVE_DELAYACCT
  211. linux_platform_headers += linux/LibNl.h
  212. linux_platform_sources += linux/LibNl.c
  213. endif
  214. if HTOP_LINUX
  215. AM_LDFLAGS += -rdynamic
  216. myhtopplatheaders = $(linux_platform_headers)
  217. myhtopplatsources = $(linux_platform_sources)
  218. endif
  219. # FreeBSD
  220. # -------
  221. freebsd_platform_headers = \
  222. freebsd/FreeBSDMachine.h \
  223. freebsd/FreeBSDProcessTable.h \
  224. freebsd/FreeBSDProcess.h \
  225. freebsd/Platform.h \
  226. freebsd/ProcessField.h \
  227. generic/fdstat_sysctl.h \
  228. generic/gettime.h \
  229. generic/hostname.h \
  230. generic/openzfs_sysctl.h \
  231. generic/uname.h \
  232. zfs/ZfsArcMeter.h \
  233. zfs/ZfsArcStats.h \
  234. zfs/ZfsCompressedArcMeter.h
  235. freebsd_platform_sources = \
  236. freebsd/Platform.c \
  237. freebsd/FreeBSDMachine.c \
  238. freebsd/FreeBSDProcessTable.c \
  239. freebsd/FreeBSDProcess.c \
  240. generic/fdstat_sysctl.c \
  241. generic/gettime.c \
  242. generic/hostname.c \
  243. generic/openzfs_sysctl.c \
  244. generic/uname.c \
  245. zfs/ZfsArcMeter.c \
  246. zfs/ZfsCompressedArcMeter.c
  247. if HTOP_FREEBSD
  248. myhtopplatheaders = $(freebsd_platform_headers)
  249. myhtopplatsources = $(freebsd_platform_sources)
  250. endif
  251. # DragonFlyBSD
  252. # ------------
  253. dragonflybsd_platform_headers = \
  254. dragonflybsd/DragonFlyBSDMachine.h \
  255. dragonflybsd/DragonFlyBSDProcessTable.h \
  256. dragonflybsd/DragonFlyBSDProcess.h \
  257. dragonflybsd/Platform.h \
  258. dragonflybsd/ProcessField.h \
  259. generic/fdstat_sysctl.h \
  260. generic/gettime.h \
  261. generic/hostname.h \
  262. generic/uname.h
  263. dragonflybsd_platform_sources = \
  264. dragonflybsd/DragonFlyBSDMachine.c \
  265. dragonflybsd/DragonFlyBSDProcessTable.c \
  266. dragonflybsd/DragonFlyBSDProcess.c \
  267. dragonflybsd/Platform.c \
  268. generic/fdstat_sysctl.c \
  269. generic/gettime.c \
  270. generic/hostname.c \
  271. generic/uname.c
  272. if HTOP_DRAGONFLYBSD
  273. myhtopplatheaders = $(dragonflybsd_platform_headers)
  274. myhtopplatsources = $(dragonflybsd_platform_sources)
  275. endif
  276. # NetBSD
  277. # -------
  278. netbsd_platform_headers = \
  279. generic/fdstat_sysctl.h \
  280. generic/gettime.h \
  281. generic/hostname.h \
  282. generic/uname.h \
  283. netbsd/Platform.h \
  284. netbsd/ProcessField.h \
  285. netbsd/NetBSDMachine.h \
  286. netbsd/NetBSDProcess.h \
  287. netbsd/NetBSDProcessTable.h
  288. netbsd_platform_sources = \
  289. generic/fdstat_sysctl.c \
  290. generic/gettime.c \
  291. generic/hostname.c \
  292. generic/uname.c \
  293. netbsd/Platform.c \
  294. netbsd/NetBSDMachine.c \
  295. netbsd/NetBSDProcess.c \
  296. netbsd/NetBSDProcessTable.c
  297. if HTOP_NETBSD
  298. myhtopplatheaders = $(netbsd_platform_headers)
  299. myhtopplatsources = $(netbsd_platform_sources)
  300. endif
  301. # OpenBSD
  302. # -------
  303. openbsd_platform_headers = \
  304. generic/gettime.h \
  305. generic/hostname.h \
  306. generic/uname.h \
  307. openbsd/OpenBSDMachine.h \
  308. openbsd/OpenBSDProcessTable.h \
  309. openbsd/OpenBSDProcess.h \
  310. openbsd/Platform.h \
  311. openbsd/ProcessField.h
  312. openbsd_platform_sources = \
  313. generic/gettime.c \
  314. generic/hostname.c \
  315. generic/uname.c \
  316. openbsd/OpenBSDMachine.c \
  317. openbsd/OpenBSDProcessTable.c \
  318. openbsd/OpenBSDProcess.c \
  319. openbsd/Platform.c
  320. if HTOP_OPENBSD
  321. myhtopplatheaders = $(openbsd_platform_headers)
  322. myhtopplatsources = $(openbsd_platform_sources)
  323. endif
  324. # Darwin
  325. # ------
  326. darwin_platform_headers = \
  327. darwin/DarwinMachine.h \
  328. darwin/DarwinProcess.h \
  329. darwin/DarwinProcessTable.h \
  330. darwin/Platform.h \
  331. darwin/PlatformHelpers.h \
  332. darwin/ProcessField.h \
  333. generic/fdstat_sysctl.h \
  334. generic/gettime.h \
  335. generic/hostname.h \
  336. generic/openzfs_sysctl.h \
  337. generic/uname.h \
  338. zfs/ZfsArcMeter.h \
  339. zfs/ZfsArcStats.h \
  340. zfs/ZfsCompressedArcMeter.h
  341. darwin_platform_sources = \
  342. darwin/Platform.c \
  343. darwin/PlatformHelpers.c \
  344. darwin/DarwinMachine.c \
  345. darwin/DarwinProcess.c \
  346. darwin/DarwinProcessTable.c \
  347. generic/fdstat_sysctl.c \
  348. generic/gettime.c \
  349. generic/hostname.c \
  350. generic/openzfs_sysctl.c \
  351. generic/uname.c \
  352. zfs/ZfsArcMeter.c \
  353. zfs/ZfsCompressedArcMeter.c
  354. if HTOP_DARWIN
  355. AM_LDFLAGS += -framework IOKit -framework CoreFoundation
  356. myhtopplatheaders = $(darwin_platform_headers)
  357. myhtopplatsources = $(darwin_platform_sources)
  358. endif
  359. # Solaris
  360. # -------
  361. solaris_platform_headers = \
  362. generic/gettime.h \
  363. generic/hostname.h \
  364. generic/uname.h \
  365. solaris/ProcessField.h \
  366. solaris/Platform.h \
  367. solaris/SolarisMachine.h \
  368. solaris/SolarisProcess.h \
  369. solaris/SolarisProcessTable.h \
  370. zfs/ZfsArcMeter.h \
  371. zfs/ZfsArcStats.h \
  372. zfs/ZfsCompressedArcMeter.h
  373. solaris_platform_sources = \
  374. generic/gettime.c \
  375. generic/hostname.c \
  376. generic/uname.c \
  377. solaris/Platform.c \
  378. solaris/SolarisMachine.c \
  379. solaris/SolarisProcess.c \
  380. solaris/SolarisProcessTable.c \
  381. zfs/ZfsArcMeter.c \
  382. zfs/ZfsCompressedArcMeter.c
  383. if HTOP_SOLARIS
  384. myhtopplatheaders = $(solaris_platform_headers)
  385. myhtopplatsources = $(solaris_platform_sources)
  386. endif
  387. # Performance Co-Pilot (PCP)
  388. # --------------------------
  389. pcp_platform_headers = \
  390. linux/CGroupUtils.h \
  391. linux/PressureStallMeter.h \
  392. linux/ZramMeter.h \
  393. linux/ZramStats.h \
  394. pcp/Instance.h \
  395. pcp/InDomTable.h \
  396. pcp/Metric.h \
  397. pcp/Platform.h \
  398. pcp/ProcessField.h \
  399. pcp/PCPDynamicColumn.h \
  400. pcp/PCPDynamicMeter.h \
  401. pcp/PCPDynamicScreen.h \
  402. pcp/PCPMachine.h \
  403. pcp/PCPProcess.h \
  404. pcp/PCPProcessTable.h \
  405. zfs/ZfsArcMeter.h \
  406. zfs/ZfsArcStats.h \
  407. zfs/ZfsCompressedArcMeter.h
  408. pcp_platform_sources = \
  409. linux/CGroupUtils.c \
  410. linux/PressureStallMeter.c \
  411. linux/ZramMeter.c \
  412. pcp/Instance.c \
  413. pcp/InDomTable.c \
  414. pcp/Metric.c \
  415. pcp/Platform.c \
  416. pcp/PCPDynamicColumn.c \
  417. pcp/PCPDynamicMeter.c \
  418. pcp/PCPDynamicScreen.c \
  419. pcp/PCPMachine.c \
  420. pcp/PCPProcess.c \
  421. pcp/PCPProcessTable.c \
  422. zfs/ZfsArcMeter.c \
  423. zfs/ZfsCompressedArcMeter.c
  424. if HTOP_PCP
  425. myhtopplatheaders = $(pcp_platform_headers)
  426. myhtopplatsources = $(pcp_platform_sources)
  427. pcp_htop_SOURCES = $(myhtopplatprogram) $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
  428. endif
  429. # Unsupported
  430. # -----------
  431. unsupported_platform_headers = \
  432. generic/gettime.h \
  433. unsupported/Platform.h \
  434. unsupported/ProcessField.h \
  435. unsupported/UnsupportedMachine.h \
  436. unsupported/UnsupportedProcess.h \
  437. unsupported/UnsupportedProcessTable.h
  438. unsupported_platform_sources = \
  439. generic/gettime.c \
  440. unsupported/Platform.c \
  441. unsupported/UnsupportedMachine.c \
  442. unsupported/UnsupportedProcess.c \
  443. unsupported/UnsupportedProcessTable.c
  444. if HTOP_UNSUPPORTED
  445. myhtopplatsources = $(unsupported_platform_sources)
  446. myhtopplatheaders = $(unsupported_platform_headers)
  447. endif
  448. # ----
  449. htop_SOURCES = $(myhtopplatprogram) $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
  450. nodist_htop_SOURCES = config.h
  451. target:
  452. echo $(htop_SOURCES)
  453. profile:
  454. $(MAKE) all AM_CPPFLAGS="-pg -O2 -DNDEBUG"
  455. debug:
  456. $(MAKE) all AM_CPPFLAGS="-ggdb3 -Og" CFLAGS="`printf ' %s ' "$(CFLAGS)"|sed -E 's#[[:space:]]-O[^[:space:]]+[[:space:]]# #g'` -ggdb3 -Og"
  457. coverage:
  458. $(MAKE) all AM_CPPFLAGS="-fprofile-arcs -ftest-coverage" AM_LDFLAGS="-lgcov"
  459. cppcheck:
  460. cppcheck -q -v . --enable=all -DHAVE_OPENVZ
  461. dist-hook: $(top_distdir)/configure
  462. @if test "x$$FORCE_MAKE_DIST" = x && \
  463. grep 'pkg_m4_absent' '$(top_distdir)/configure' >/dev/null; then \
  464. echo 'ERROR: This distribution would have incomplete pkg-config support. Rebuilding the configure script is advised. Set FORCE_MAKE_DIST=1 to ignore this warning.'>&2; \
  465. (exit 1); \
  466. else :; \
  467. fi
  468. @if grep 'PACKAGE_VERSION.*-g' '$(top_distdir)/configure'; then \
  469. echo 'WARNING: You are building a dist from a git version. Better run make dist outside of a .git repo on a tagged release.'>&2; \
  470. fi
  471. .PHONY: lcov
  472. lcov:
  473. mkdir -p lcov
  474. lcov --capture --directory . --output-file coverage.info
  475. genhtml coverage.info --output-directory lcov