Makefile.am 4.04 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 EnvScreen.c \
Hisham's avatar
Hisham committed
27
InfoScreen.c XAlloc.c
Hisham Muhammad's avatar
Hisham Muhammad committed
28
29
30

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

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

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

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

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

56
57
58
59
60
61
62
63
if HTOP_OPENBSD
myhtopplatsources = openbsd/Platform.c openbsd/OpenBSDProcessList.c \
openbsd/OpenBSDProcess.c openbsd/OpenBSDCRT.c openbsd/Battery.c

myhtopplatheaders = openbsd/Platform.h openbsd/OpenBSDProcessList.h \
openbsd/OpenBSDProcess.h openbsd/OpenBSDCRT.h openbsd/Battery.h
endif

64
65
66
67
68
69
70
71
72
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

73
if HTOP_UNSUPPORTED
74
75
76
myhtopplatsources = unsupported/Platform.c \
unsupported/UnsupportedProcess.c unsupported/UnsupportedProcessList.c \
unsupported/UnsupportedCRT.c unsupported/Battery.c
77

78
79
80
myhtopplatheaders = unsupported/Platform.h \
unsupported/UnsupportedProcess.h unsupported/UnsupportedProcessList.h \
unsupported/UnsupportedCRT.h unsupported/Battery.h
81
endif
Hisham Muhammad's avatar
Hisham Muhammad committed
82
83
84

SUFFIXES = .h

85
86
87
88
89
BUILT_SOURCES = $(myhtopheaders) $(myhtopplatheaders)
htop_SOURCES  = $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources) config.h

target:
	echo $(htop_SOURCES)
90

91
profile:
92
	$(MAKE) all CFLAGS="-pg" AM_CPPFLAGS="-pg -O2 -DNDEBUG"
93

Hisham Muhammad's avatar
Hisham Muhammad committed
94
debug:
95
	$(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG"
96

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

Hisham Muhammad's avatar
Hisham Muhammad committed
100
.c.h:
101
	@srcdir@/scripts/MakeHeader.py $<
Hisham Muhammad's avatar
Hisham Muhammad committed
102

103
cppcheck:
104
	cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS
105

Hisham Muhammad's avatar
Hisham Muhammad committed
106
107
108
109
110
111
.PHONY: lcov

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