Makefile.am 3.68 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
htop_LDFLAGS = 
17
AM_CPPFLAGS = -DNDEBUG
Hisham Muhammad's avatar
Hisham Muhammad committed
18

Hisham Muhammad's avatar
Hisham Muhammad committed
19
myhtopsources = AvailableMetersPanel.c CategoriesPanel.c CheckItem.c \
Hisham Muhammad's avatar
Hisham Muhammad committed
20
ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.c MainPanel.c \
Hisham Muhammad's avatar
Hisham Muhammad committed
21
22
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
23
BatteryMeter.c Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \
David Hunt's avatar
David Hunt committed
24
25
SignalsPanel.c StringUtils.c SwapMeter.c TasksMeter.c UptimeMeter.c \
TraceScreen.c UsersTable.c Vector.c AvailableColumnsPanel.c AffinityPanel.c \
26
HostnameMeter.c OpenFilesScreen.c Affinity.c IncSet.c Action.c
Hisham Muhammad's avatar
Hisham Muhammad committed
27
28
29

myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \
CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \
Hisham Muhammad's avatar
Hisham Muhammad committed
30
CPUMeter.h CRT.h MainPanel.h DisplayOptionsPanel.h FunctionBar.h \
Hisham Muhammad's avatar
Hisham Muhammad committed
31
Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \
Hisham Muhammad's avatar
Hisham Muhammad committed
32
BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
David Hunt's avatar
David Hunt committed
33
34
35
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
36
37

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

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

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

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

54
55
56
57
58
59
60
61
62
if HTOP_DARWIN
htop_LDFLAGS += -framework IOKit -framework CoreFoundation
myhtopplatsources = darwin/Platform.c darwin/DarwinProcess.c \
darwin/DarwinProcessList.c darwin/DarwinCRT.c darwin/Battery.c

myhtopplatheaders = darwin/Platform.h darwin/DarwinProcess.h \
darwin/DarwinProcessList.h darwin/DarwinCRT.h darwin/Battery.h
endif

63
if HTOP_UNSUPPORTED
64
65
66
myhtopplatsources = unsupported/Platform.c \
unsupported/UnsupportedProcess.c unsupported/UnsupportedProcessList.c \
unsupported/UnsupportedCRT.c unsupported/Battery.c
67

68
69
70
myhtopplatheaders = unsupported/Platform.h \
unsupported/UnsupportedProcess.h unsupported/UnsupportedProcessList.h \
unsupported/UnsupportedCRT.h unsupported/Battery.h
71
endif
Hisham Muhammad's avatar
Hisham Muhammad committed
72
73
74

SUFFIXES = .h

75
76
77
78
79
BUILT_SOURCES = $(myhtopheaders) $(myhtopplatheaders)
htop_SOURCES  = $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources) config.h

target:
	echo $(htop_SOURCES)
80

81
profile:
82
	$(MAKE) all CFLAGS="-pg" AM_CPPFLAGS="-pg -O2 -DNDEBUG"
83

Hisham Muhammad's avatar
Hisham Muhammad committed
84
debug:
85
	$(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG"
86

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

Hisham Muhammad's avatar
Hisham Muhammad committed
90
.c.h:
91
	@srcdir@/scripts/MakeHeader.py $<
Hisham Muhammad's avatar
Hisham Muhammad committed
92

93
cppcheck:
94
	cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS
95

Hisham Muhammad's avatar
Hisham Muhammad committed
96
97
98
99
100
101
.PHONY: lcov

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