summaryrefslogtreecommitdiffstats
path: root/lib/meson.build
blob: 0847d59c6268555ae1b870b255cf965be9a1e79b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
lib_common_sources = '''
	blkdev.c
	buffer.c
	canonicalize.c
	color-names.c
	crc32.c
	crc32c.c
	c_strtod.c
	encode.c
	env.c
	fileutils.c
	idcache.c
	jsonwrt.c
	mangle.c
	match.c
	mbsalign.c
	mbsedit.c
	md5.c
	pager.c
	procfs.c
	pwdutils.c
	randutils.c
	sha1.c
	signames.c
	strutils.c
	strv.c
	timeutils.c
	ttyutils.c
'''.split()

idcache_c = files('idcache.c')
randutils_c = files('randutils.c')
md5_c = files('md5.c')
sha1_c = files('sha1.c')
strutils_c = files('strutils.c')
strv_c = files('strv.c')

lib_common_sources += [idcache_c,
                       randutils_c,
                       md5_c,
                       sha1_c,
                       strutils_c,
                       strv_c]

monotonic_c = files('monotonic.c')
timer_c = files('timer.c')
swapprober_c = files('swapprober.c')
pty_session_c = files('pty-session.c')
ismounted_c = files('ismounted.c')
exec_shell_c = files('exec_shell.c')
fileeq_c = files('fileeq.c')

if LINUX
  lib_common_sources += '''
    caputils.c
    linux_version.c
    loopdev.c
'''.split()
endif

if build_plymouth_support
  lib_common_sources += '''
        plymouth-ctrl.c
'''.split()
endif

if conf.get('HAVE_LANGINFO_H') in [1]
  lib_common_sources += 'langinfo.c'
endif

if conf.get('HAVE_CPU_SET_T') in [1]
  lib_common_sources += 'cpuset.c'
endif

if conf.get('HAVE_OPENAT') in [1] and conf.get('HAVE_DIRFD') in [1]
  lib_common_sources += '''
    path.c
    procfs.c
    sysfs.c
'''.split()
endif

lib_common = static_library(
  'common',
  lib_common_sources,
  include_directories : dir_include)


lib_color_sources = files('''
  colors.c
  color-names.c
'''.split())
# colors.h include/color-names.h

lib_tcolors = static_library(
  'tcolors',
  lib_color_sources,
  include_directories : dir_include,
  dependencies : curses_libs)