bigbiff | 7b4c7a6 | 2015-01-01 19:44:14 -0500 | [diff] [blame] | 1 | |
| 2 | noinst_LTLIBRARIES += libcommon.la |
| 3 | libcommon_la_CFLAGS = $(AM_CFLAGS) |
| 4 | libcommon_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 | |
| 30 | if LINUX |
| 31 | libcommon_la_SOURCES += \ |
| 32 | lib/linux_version.c \ |
| 33 | lib/loopdev.c |
| 34 | endif |
| 35 | |
| 36 | if !HAVE_LANGINFO |
| 37 | libcommon_la_SOURCES += lib/langinfo.c |
| 38 | endif |
| 39 | |
| 40 | if HAVE_CPU_SET_T |
| 41 | libcommon_la_SOURCES += lib/cpuset.c |
| 42 | endif |
| 43 | |
| 44 | dist_man_MANS += lib/terminal-colors.d.5 |
| 45 | |
| 46 | check_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 | |
| 59 | if LINUX |
| 60 | if HAVE_CPU_SET_T |
| 61 | check_PROGRAMS += test_cpuset |
| 62 | endif |
| 63 | check_PROGRAMS += \ |
| 64 | test_sysfs \ |
| 65 | test_pager |
| 66 | endif |
| 67 | |
| 68 | test_ttyutils_SOURCES = lib/ttyutils.c |
| 69 | test_ttyutils_CFLAGS = -DTEST_PROGRAM |
| 70 | test_ttyutils_LDADD = libcommon.la |
| 71 | |
| 72 | test_blkdev_SOURCES = lib/blkdev.c |
| 73 | test_blkdev_CFLAGS = -DTEST_PROGRAM_BLKDEV |
| 74 | test_blkdev_LDADD = libcommon.la |
| 75 | |
| 76 | test_ismounted_SOURCES = lib/ismounted.c |
| 77 | test_ismounted_CFLAGS = -DTEST_PROGRAM |
| 78 | test_ismounted_LDADD = libcommon.la |
| 79 | |
| 80 | test_mangle_SOURCES = lib/mangle.c |
| 81 | test_mangle_CFLAGS = -DTEST_PROGRAM |
| 82 | |
| 83 | test_at_SOURCES = lib/at.c |
| 84 | test_at_CFLAGS = -DTEST_PROGRAM_AT |
| 85 | |
| 86 | test_strutils_SOURCES = lib/strutils.c |
| 87 | test_strutils_CFLAGS = -DTEST_PROGRAM |
| 88 | |
| 89 | test_colors_SOURCES = lib/colors.c |
| 90 | test_colors_CFLAGS = -DTEST_PROGRAM |
| 91 | |
| 92 | test_randutils_SOURCES = lib/randutils.c |
| 93 | test_randutils_CFLAGS = -DTEST_PROGRAM |
| 94 | |
| 95 | test_procutils_SOURCES = lib/procutils.c lib/at.c |
| 96 | test_procutils_CFLAGS = -DTEST_PROGRAM |
| 97 | |
| 98 | if LINUX |
| 99 | test_cpuset_SOURCES = lib/cpuset.c |
| 100 | test_cpuset_CFLAGS = -DTEST_PROGRAM |
| 101 | |
| 102 | test_sysfs_SOURCES = lib/sysfs.c |
| 103 | test_sysfs_CFLAGS = -DTEST_PROGRAM_SYSFS |
| 104 | test_sysfs_LDADD = libcommon.la |
| 105 | |
| 106 | test_pager_SOURCES = lib/pager.c |
| 107 | test_pager_CFLAGS = -DTEST_PROGRAM |
| 108 | endif |
| 109 | |
| 110 | test_fileutils_SOURCES = lib/fileutils.c |
| 111 | test_fileutils_CFLAGS = -DTEST_PROGRAM |
| 112 | |
| 113 | test_canonicalize_SOURCES = lib/canonicalize.c |
| 114 | test_canonicalize_CFLAGS = -DTEST_PROGRAM_CANONICALIZE |
| 115 | |