Makefile.am 3.34 KB
Newer Older
Hisham Muhammad's avatar
Hisham Muhammad committed
1

2
ACLOCAL_AMFLAGS = -I m4
3
AUTOMAKE_OPTIONS = subdir-objects
4

Hisham Muhammad's avatar
Hisham Muhammad committed
5
bin_PROGRAMS = htop
6

Hisham Muhammad's avatar
Hisham Muhammad committed
7
dist_man_MANS = htop.1
8
9
EXTRA_DIST = $(dist_man_MANS) htop.desktop htop.png scripts/MakeHeader.py \
install-sh autogen.sh missing
Hisham Muhammad's avatar
Hisham Muhammad committed
10
11
12
13
14
applicationsdir = $(datadir)/applications
applications_DATA = htop.desktop
pixmapdir = $(datadir)/pixmaps
pixmap_DATA = htop.png

David Hunt's avatar
David Hunt committed
15
htop_CFLAGS = -pedantic -Wall $(wextra_flag) -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(top_srcdir)/$(my_htop_platform)"
16
AM_CPPFLAGS = -DNDEBUG
Hisham Muhammad's avatar
Hisham Muhammad committed
17

Hisham Muhammad's avatar
Hisham Muhammad committed
18
myhtopsources = AvailableMetersPanel.c CategoriesPanel.c CheckItem.c \
Hisham Muhammad's avatar
Hisham Muhammad committed
19
ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.c MainPanel.c \
Hisham Muhammad's avatar
Hisham Muhammad committed
20
21
DisplayOptionsPanel.c FunctionBar.c Hashtable.c Header.c htop.c ListItem.c \
LoadAverageMeter.c MemoryMeter.c Meter.c MetersPanel.c Object.c Panel.c \
Hisham Muhammad's avatar
Hisham Muhammad committed
22
BatteryMeter.c Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \
David Hunt's avatar
David Hunt committed
23
24
SignalsPanel.c StringUtils.c SwapMeter.c TasksMeter.c UptimeMeter.c \
TraceScreen.c UsersTable.c Vector.c AvailableColumnsPanel.c AffinityPanel.c \
25
HostnameMeter.c OpenFilesScreen.c Affinity.c IncSet.c Action.c
Hisham Muhammad's avatar
Hisham Muhammad committed
26
27
28

myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \
CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \
Hisham Muhammad's avatar
Hisham Muhammad committed
29
CPUMeter.h CRT.h MainPanel.h DisplayOptionsPanel.h FunctionBar.h \
Hisham Muhammad's avatar
Hisham Muhammad committed
30
Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \
Hisham Muhammad's avatar
Hisham Muhammad committed
31
BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
David Hunt's avatar
David Hunt committed
32
33
34
ScreenManager.h Settings.h SignalsPanel.h StringUtils.h SwapMeter.h \
TasksMeter.h UptimeMeter.h TraceScreen.h UsersTable.h Vector.h Process.h \
AffinityPanel.h HostnameMeter.h OpenFilesScreen.h Affinity.h IncSet.h Action.h
35
36

if HTOP_LINUX
37
htop_CFLAGS += -rdynamic 
38
myhtopplatsources = linux/Platform.c linux/IOPriorityPanel.c linux/IOPriority.c \
39
linux/LinuxProcess.c linux/LinuxProcessList.c linux/LinuxCRT.c linux/Battery.c
40
41

myhtopplatheaders = linux/Platform.h linux/IOPriorityPanel.h linux/IOPriority.h \
42
linux/LinuxProcess.h linux/LinuxProcessList.h linux/LinuxCRT.h linux/Battery.h
43
44
endif

Hisham Muhammad's avatar
Hisham Muhammad committed
45
46
if HTOP_FREEBSD
myhtopplatsources = freebsd/Platform.c freebsd/FreeBSDProcessList.c \
47
freebsd/FreeBSDProcess.c freebsd/FreeBSDCRT.c freebsd/Battery.c
Hisham Muhammad's avatar
Hisham Muhammad committed
48
49

myhtopplatheaders = freebsd/Platform.h freebsd/FreeBSDProcessList.h \
50
freebsd/FreeBSDProcess.h freebsd/FreeBSDCRT.h freebsd/Battery.h
Hisham Muhammad's avatar
Hisham Muhammad committed
51
52
endif

53
if HTOP_UNSUPPORTED
54
55
56
myhtopplatsources = unsupported/Platform.c \
unsupported/UnsupportedProcess.c unsupported/UnsupportedProcessList.c \
unsupported/UnsupportedCRT.c unsupported/Battery.c
57

58
59
60
myhtopplatheaders = unsupported/Platform.h \
unsupported/UnsupportedProcess.h unsupported/UnsupportedProcessList.h \
unsupported/UnsupportedCRT.h unsupported/Battery.h
61
endif
Hisham Muhammad's avatar
Hisham Muhammad committed
62
63
64

SUFFIXES = .h

65
66
67
68
69
BUILT_SOURCES = $(myhtopheaders) $(myhtopplatheaders)
htop_SOURCES  = $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources) config.h

target:
	echo $(htop_SOURCES)
70

71
profile:
72
	$(MAKE) all CFLAGS="-pg" AM_CPPFLAGS="-pg -O2 -DNDEBUG"
73

Hisham Muhammad's avatar
Hisham Muhammad committed
74
debug:
75
	$(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG"
76

Hisham Muhammad's avatar
Hisham Muhammad committed
77
78
79
coverage:
	$(MAKE) all CFLAGS="" AM_CPPFLAGS="-fprofile-arcs -ftest-coverage -DDEBUG" AM_LDFLAGS="-lgcov"

Hisham Muhammad's avatar
Hisham Muhammad committed
80
.c.h:
81
	@srcdir@/scripts/MakeHeader.py $<
Hisham Muhammad's avatar
Hisham Muhammad committed
82

83
cppcheck:
84
	cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS
85

Hisham Muhammad's avatar
Hisham Muhammad committed
86
87
88
89
90
91
.PHONY: lcov

lcov:
	mkdir -p lcov
	lcov --capture --directory . --output-file coverage.info
	genhtml coverage.info --output-directory lcov