blob: 565294e5c340d93573f54a45fcb9e57f7c6cd8fb [file] [log] [blame]
bigbiff7b4c7a62015-01-01 19:44:14 -05001
2noinst_LTLIBRARIES += libcommon.la
3libcommon_la_CFLAGS = $(AM_CFLAGS)
4libcommon_la_SOURCES = \
5 lib/at.c \
6 lib/blkdev.c \
7 lib/canonicalize.c \
8 lib/colors.c \
9 lib/crc32.c \
10 lib/crc64.c \
11 lib/env.c \
12 lib/fileutils.c \
13 lib/ismounted.c \
14 lib/mangle.c \
15 lib/match.c \
16 lib/mbsalign.c \
17 lib/md5.c \
18 lib/pager.c \
19 lib/path.c \
20 lib/procutils.c \
21 lib/randutils.c \
22 lib/setproctitle.c \
23 lib/strutils.c \
24 lib/sysfs.c \
25 lib/timeutils.c \
26 lib/ttyutils.c \
27 lib/exec_shell.c \
28 lib/readutmp.c
29
30if LINUX
31libcommon_la_SOURCES += \
32 lib/linux_version.c \
33 lib/loopdev.c
34endif
35
36if !HAVE_LANGINFO
37libcommon_la_SOURCES += lib/langinfo.c
38endif
39
40if HAVE_CPU_SET_T
41libcommon_la_SOURCES += lib/cpuset.c
42endif
43
44dist_man_MANS += lib/terminal-colors.d.5
45
46check_PROGRAMS += \
47 test_at \
48 test_blkdev \
49 test_canonicalize \
50 test_colors \
51 test_fileutils \
52 test_ismounted \
53 test_mangle \
54 test_procutils \
55 test_randutils \
56 test_strutils \
57 test_ttyutils
58
59if LINUX
60if HAVE_CPU_SET_T
61check_PROGRAMS += test_cpuset
62endif
63check_PROGRAMS += \
64 test_sysfs \
65 test_pager
66endif
67
68test_ttyutils_SOURCES = lib/ttyutils.c
69test_ttyutils_CFLAGS = -DTEST_PROGRAM
70test_ttyutils_LDADD = libcommon.la
71
72test_blkdev_SOURCES = lib/blkdev.c
73test_blkdev_CFLAGS = -DTEST_PROGRAM_BLKDEV
74test_blkdev_LDADD = libcommon.la
75
76test_ismounted_SOURCES = lib/ismounted.c
77test_ismounted_CFLAGS = -DTEST_PROGRAM
78test_ismounted_LDADD = libcommon.la
79
80test_mangle_SOURCES = lib/mangle.c
81test_mangle_CFLAGS = -DTEST_PROGRAM
82
83test_at_SOURCES = lib/at.c
84test_at_CFLAGS = -DTEST_PROGRAM_AT
85
86test_strutils_SOURCES = lib/strutils.c
87test_strutils_CFLAGS = -DTEST_PROGRAM
88
89test_colors_SOURCES = lib/colors.c
90test_colors_CFLAGS = -DTEST_PROGRAM
91
92test_randutils_SOURCES = lib/randutils.c
93test_randutils_CFLAGS = -DTEST_PROGRAM
94
95test_procutils_SOURCES = lib/procutils.c lib/at.c
96test_procutils_CFLAGS = -DTEST_PROGRAM
97
98if LINUX
99test_cpuset_SOURCES = lib/cpuset.c
100test_cpuset_CFLAGS = -DTEST_PROGRAM
101
102test_sysfs_SOURCES = lib/sysfs.c
103test_sysfs_CFLAGS = -DTEST_PROGRAM_SYSFS
104test_sysfs_LDADD = libcommon.la
105
106test_pager_SOURCES = lib/pager.c
107test_pager_CFLAGS = -DTEST_PROGRAM
108endif
109
110test_fileutils_SOURCES = lib/fileutils.c
111test_fileutils_CFLAGS = -DTEST_PROGRAM
112
113test_canonicalize_SOURCES = lib/canonicalize.c
114test_canonicalize_CFLAGS = -DTEST_PROGRAM_CANONICALIZE
115