Makefile.am 2.62 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

15
htop_CFLAGS = -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(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 \
19
ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.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 \
23
SignalsPanel.c String.c SwapMeter.c TasksMeter.c TraceScreen.c \
24
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 \
29
CPUMeter.h CRT.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 \
32
ScreenManager.h Settings.h SignalsPanel.h String.h SwapMeter.h TasksMeter.h \
33
TraceScreen.h UsersTable.h Vector.h Process.h AffinityPanel.h \
34
35
36
37
HostnameMeter.h OpenFilesScreen.h Affinity.h IncSet.h Action.h

if HTOP_LINUX
myhtopplatsources = linux/Platform.c linux/IOPriorityPanel.c linux/IOPriority.c \
38
39
linux/LinuxProcess.c linux/LinuxProcessList.c linux/LinuxCRT.c \
linux/UptimeMeter.c
40
41

myhtopplatheaders = linux/Platform.h linux/IOPriorityPanel.h linux/IOPriority.h \
42
43
linux/LinuxProcess.h linux/LinuxProcessList.h linux/LinuxCRT.h \
linux/UptimeMeter.h
44
45
46
47
48
49
50
51
52
endif

if HTOP_UNSUPPORTED
myhtopplatsources = unsupported/Platform.c unsupported/UnsupportedProcessList.c \
unsupported/UnsupportedCRT.c

myhtopplatheaders = unsupported/Platform.h unsupported/UnsupportedProcessList.h \
unsupported/UnsupportedCRT.h
endif
Hisham Muhammad's avatar
Hisham Muhammad committed
53
54
55

SUFFIXES = .h

56
57
58
59
60
BUILT_SOURCES = $(myhtopheaders) $(myhtopplatheaders)
htop_SOURCES  = $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources) config.h

target:
	echo $(htop_SOURCES)
61

62
profile:
63
	$(MAKE) all CFLAGS="-pg" AM_CPPFLAGS="-pg -O2 -DNDEBUG"
64

Hisham Muhammad's avatar
Hisham Muhammad committed
65
debug:
66
	$(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG"
67

Hisham Muhammad's avatar
Hisham Muhammad committed
68
.c.h:
69
	@srcdir@/scripts/MakeHeader.py $<
Hisham Muhammad's avatar
Hisham Muhammad committed
70

71
cppcheck:
72
	cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS
73