Makefile.am 6.71 KB
Newer Older
1 2
CYGWINFLAGS =
if CYGWIN
3 4
CYGWINFLAGS += -lintl
usrbin_exec_PROGRAMS =
5 6
endif

7 8
AM_CPPFLAGS = \
	-include $(top_builddir)/config.h \
9
	-I$(top_srcdir) \
10 11
	-I$(top_srcdir)/include \
	-DLOCALEDIR=\"$(localedir)\"
12

13 14
PACKAGE_VERSION = @PACKAGE_VERSION@

15
ACLOCAL_AMFLAGS = -I m4
Sami Kerola's avatar
Sami Kerola committed
16
SUBDIRS = \
17
	include \
18
	man-po \
Sami Kerola's avatar
Sami Kerola committed
19
	po \
20
	testsuite
21 22

AM_CFLAGS = -Iproc
23
LDADD = ./proc/libprocps.la $(CYGWINFLAGS)
24

25 26 27 28 29 30 31 32 33 34 35 36 37
if CYGWIN
AM_LDFLAGS = ./proc/libprocps.la $(CYGWINFLAGS)
endif

transform =

if !CYGWIN
transform += s/pscommand/ps/; $(program_transform_name)
sbin_PROGRAMS = \
	sysctl
else
transform += s/pscommand/procps/; $(program_transform_name)
endif
38

39
if !CYGWIN
40
bin_PROGRAMS = \
41
	ps/pscommand \
42 43 44 45 46 47 48 49 50
	free \
	pgrep \
	pkill \
	pmap \
	pwdx \
	tload \
	uptime \
	vmstat \
	w
51 52 53 54 55 56 57 58 59 60 61
else
usrbin_exec_PROGRAMS += \
	ps/pscommand \
	free \
	pgrep \
	pkill \
	pmap \
	uptime \
	vmstat \
	w
endif
62 63 64 65

lib_LTLIBRARIES = \
	proc/libprocps.la

66 67 68 69 70 71 72
dist_man_MANS = \
	free.1 \
	pgrep.1 \
	pkill.1 \
	pmap.1 \
	uptime.1 \
	vmstat.8 \
73
	w.1 \
74 75 76 77 78 79 80 81
	ps/procps.1

if !CYGWIN
dist_man_MANS += \
	pwdx.1 \
	tload.1 \
	sysctl.8 \
	sysctl.conf.5 \
82
	ps/ps.1
83
endif
84

Craig Small's avatar
Craig Small committed
85
EXTRA_DIST = \
86
	.version \
Craig Small's avatar
Craig Small committed
87 88 89 90
	autogen.sh \
	contrib \
	COPYING.LIB \
	misc/git-version-gen \
91
	Documentation/CodingStyle.md \
Craig Small's avatar
Craig Small committed
92
	Documentation/TODO \
93 94
	ps/HACKING \
	ps/regression \
95
	$(DIST_MAN_POTS)
Craig Small's avatar
Craig Small committed
96

97 98
procpsngdir = $(docdir)
dist_procpsng_DATA = \
99
	Documentation/bugs.md \
100 101
	Documentation/FAQ

102 103 104 105 106
if !CYGWIN
EXTRA_DIST += \
	sysctl.conf
endif

107
if BUILD_PIDOF
108
if !CYGWIN
109
bin_PROGRAMS += pidof
110 111 112
else
usrbin_exec_PROGRAMS += pidof
endif
113
dist_man_MANS += pidof.1
114
pidof_SOURCES = pidof.c lib/fileutils.c
115 116 117 118
else
  EXTRA_DIST += pidof.1
endif

119
if BUILD_KILL
120 121 122 123
if CYGWIN
transform += ;s/^kill/prockill/; $(program_transform_name)
usrbin_exec_PROGRAMS += kill
else
124
bin_PROGRAMS += kill
125 126
endif

127
dist_man_MANS += kill.1
128
kill_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
Craig Small's avatar
Craig Small committed
129 130
else
  EXTRA_DIST += kill.1
131 132
endif

133
if WITH_NCURSES
134
if !CYGWIN
135
bin_PROGRAMS += \
136
	slabtop \
137 138
	watch \
	top/top
139 140 141 142 143 144
else
usrbin_exec_PROGRAMS += \
	watch \
	top/top
endif

145
dist_man_MANS += \
146 147
	watch.1 \
	top/top.1
148
watch_SOURCES = watch.c lib/strutils.c lib/fileutils.c
149
watch_LDADD = @WATCH_NCURSES_LIBS@ $(CYGWINFLAGS)
150
watch_CFLAGS = @WATCH_NCURSES_CFLAGS@
151 152 153 154 155 156
top_top_SOURCES = \
	top/top.h \
	top/top.c \
	top/top_nls.h \
	top/top_nls.c \
	lib/fileutils.c
157

158
if CYGWIN
159 160 161 162 163 164
top_top_SOURCES += lib/strverscmp.c
else
dist_man_MANS += \
	slabtop.1
slabtop_SOURCES = slabtop.c lib/strutils.c lib/fileutils.c
slabtop_LDADD = $(LDADD) @NCURSES_LIBS@
165 166
endif

167
top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB)
168 169
endif

170
if BUILD_SKILL
171
if !CYGWIN
172
bin_PROGRAMS += \
173 174
	skill \
	snice
175 176 177 178 179
else
usrbin_exec_PROGRAMS += \
	skill \
	snice
endif
180 181
skill_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
snice_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
182 183 184
dist_man_MANS += \
	skill.1 \
	snice.1
Craig Small's avatar
Craig Small committed
185 186 187 188
else
  EXTRA_DIST += \
	skill.1 \
	snice.1
189 190
endif

191 192 193 194
free_SOURCES = free.c lib/strutils.c lib/fileutils.c
pgrep_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
pkill_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
pmap_SOURCES = pmap.c lib/fileutils.c
195
if !CYGWIN
196
pwdx_SOURCES = pwdx.c lib/fileutils.c
197
pwdx_LDADD= $(CYGWINFLAGS)
198 199 200
sysctl_SOURCES = \
	sysctl.c \
	lib/fileutils.c \
Craig Small's avatar
Craig Small committed
201
	procio.c
202
endif
203 204 205 206
tload_SOURCES = tload.c lib/strutils.c lib/fileutils.c
uptime_SOURCES = uptime.c lib/fileutils.c
vmstat_SOURCES = vmstat.c lib/strutils.c lib/fileutils.c
w_SOURCES = w.c lib/fileutils.c
207

208 209 210
# proc/libprocps.la

# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
Craig Small's avatar
Craig Small committed
211
LIBprocps_CURRENT=8
212
LIBprocps_REVISION=0
Craig Small's avatar
Craig Small committed
213
LIBprocps_AGE=1
214 215 216 217 218 219 220

proc_libprocps_la_LIBADD = $(LIB_KPARTS)

if WITH_SYSTEMD
proc_libprocps_la_LIBADD += @SYSTEMD_LIBS@
endif

Sven Eden's avatar
Sven Eden committed
221 222 223 224
if WITH_ELOGIND
proc_libprocps_la_LIBADD += @ELOGIND_LIBS@
endif

225 226 227 228 229 230 231 232 233 234 235 236
proc_libprocps_la_LDFLAGS = \
	-version-info $(LIBprocps_CURRENT):$(LIBprocps_REVISION):$(LIBprocps_AGE) \
	-no-undefined \
	-Wl,--version-script=$(top_srcdir)/proc/libprocps.sym

proc_libprocps_la_SOURCES = \
	proc/alloc.c \
	proc/alloc.h \
	proc/devname.c \
	proc/devname.h \
	proc/escape.c \
	proc/escape.h \
237 238
	proc/numa.c \
	proc/numa.h \
239
	proc/procps-private.h \
240 241 242 243 244 245 246 247 248 249 250 251 252
	proc/procps.h \
	proc/pwcache.c \
	proc/pwcache.h \
	proc/readproc.c \
	proc/readproc.h \
	proc/sig.c \
	proc/sig.h \
	proc/slab.c \
	proc/slab.h \
	proc/sysinfo.c \
	proc/sysinfo.h \
	proc/version.c \
	proc/version.h \
253
	proc/wchan.c \
254 255 256 257 258 259 260 261 262
	proc/wchan.h \
	proc/whattime.c \
	proc/whattime.h

proc_libprocps_la_includedir = $(includedir)/proc/
proc_libprocps_la_include_HEADERS = \
	proc/alloc.h \
	proc/devname.h \
	proc/escape.h \
263
	proc/numa.h \
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
	proc/procps.h \
	proc/pwcache.h \
	proc/readproc.h \
	proc/sig.h \
	proc/slab.h \
	proc/sysinfo.h \
	proc/version.h \
	proc/wchan.h \
	proc/whattime.h

dist_man_MANS += \
	proc/openproc.3 \
	proc/readproc.3 \
	proc/readproctab.3

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
	proc/libprocps.pc

EXTRA_DIST += proc/libprocps.sym

# ps/pscommand

ps_pscommand_SOURCES =  \
	ps/common.h \
	ps/display.c \
	ps/global.c \
	ps/help.c \
	ps/output.c \
	ps/parser.c \
	ps/select.c \
	ps/sortformat.c \
	ps/stacktrace.c \
	lib/fileutils.c

299
# Test programs not used by dejagnu but run directly
300 301 302
TESTS = \
	lib/test_strtod_nol
check_PROGRAMS = $(TESTS)
303

304 305
# Test programs required for dejagnu
noinst_PROGRAMS = \
Craig Small's avatar
Craig Small committed
306 307 308
	lib/test_strutils \
	lib/test_fileutils \
	lib/test_nsutils \
309
	lib/test_process
310 311

lib_test_strutils_SOURCES = lib/test_strutils.c lib/strutils.c
312
lib_test_strutils_LDADD = $(CYGWINFLAGS)
313
lib_test_fileutils_SOURCES = lib/test_fileutils.c lib/fileutils.c
314
lib_test_fileutils_LDADD = $(CYGWINFLAGS)
315
lib_test_nsutils_SOURCES = lib/test_nsutils.c lib/nsutils.c
316
lib_test_nsutils_LDADD = $(CYGWINFLAGS)
317
lib_test_process_SOURCES = lib/test_process.c
318
lib_test_process_LDADD = $(CYGWINFLAGS)
319

320
lib_test_strtod_nol_SOURCES = lib/test_strtod_nol.c lib/strutils.c
321
lib_test_strtod_nol_LDADD = $(CYGWINFLAGS)
322

323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
if CYGWIN
	skill_LDADD = $(CYGWINFLAGS)
	kill_LDADD = $(CYGWINFLAGS)
	free_LDADD = $(CYGWINFLAGS)
	pgrep_LDADD = $(CYGWINFLAGS)
	pkill_LDADD = $(CYGWINFLAGS)
	pidof_LDADD = $(CYGWINFLAGS)
	pmap_LDADD = $(CYGWINFLAGS)
	snice_LDADD = $(CYGWINFLAGS)
	tload_LDADD = $(CYGWINFLAGS)
	uptime_LDADD = $(CYGWINFLAGS)
	w_LDADD = $(CYGWINFLAGS)
	vmstat_LDADD = $(CYGWINFLAGS)
endif

338
if EXAMPLE_FILES
339
if !CYGWIN
340
sysconf_DATA = sysctl.conf
341
endif
342
endif
343

344
BUILT_SOURCES = $(top_srcdir)/.version
345

Craig Small's avatar
Craig Small committed
346
$(top_srcdir)/.version:
347
	touch $(top_srcdir)/.version
Craig Small's avatar
Craig Small committed
348 349 350
	echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
	echo $(VERSION) > $(distdir)/.tarball-version
351

352
get-trans:
353
	echo "Getting the latest translations from translationproject.org..."
Trần Ngọc Quân's avatar
Trần Ngọc Quân committed
354
	rsync -Lrtvz  translationproject.org::tp/latest/procps-ng/  po
355 356 357
	rsync -Lrtvz  translationproject.org::tp/latest/procps-ng-man/  man-po
	rsync -Lrtvz  translationproject.org::tp/latest/procps-ng-man-ps/  man-po/ps
	rsync -Lrtvz  translationproject.org::tp/latest/procps-ng-man-top/  man-po/top