]>
Commit | Line | Data |
---|---|---|
5c23128d | 1 | udevadm_sources = files(''' |
37efbbd8 ZJS |
2 | udevadm.c |
3 | udevadm-info.c | |
4 | udevadm-control.c | |
5 | udevadm-monitor.c | |
6 | udevadm-hwdb.c | |
7 | udevadm-settle.c | |
8 | udevadm-trigger.c | |
9 | udevadm-test.c | |
10 | udevadm-test-builtin.c | |
11 | udevadm-util.c | |
12 | udevadm-util.h | |
5c23128d ZJS |
13 | '''.split()) |
14 | ||
15 | systemd_udevd_sources = files('udevd.c') | |
16 | ||
17 | libudev_core_sources = ''' | |
37efbbd8 ZJS |
18 | udev.h |
19 | udev-event.c | |
20 | udev-watch.c | |
21 | udev-node.c | |
22 | udev-rules.c | |
23 | udev-ctrl.c | |
24 | udev-builtin.c | |
25 | udev-builtin-btrfs.c | |
26 | udev-builtin-hwdb.c | |
27 | udev-builtin-input_id.c | |
28 | udev-builtin-keyboard.c | |
29 | udev-builtin-net_id.c | |
30 | udev-builtin-net_setup_link.c | |
31 | udev-builtin-path_id.c | |
32 | udev-builtin-usb_id.c | |
33 | net/link-config.c | |
34 | net/link-config.h | |
35 | net/ethtool-util.c | |
36 | net/ethtool-util.h | |
5c23128d ZJS |
37 | '''.split() |
38 | ||
2c201c21 | 39 | if conf.get('HAVE_KMOD', false) |
37efbbd8 | 40 | libudev_core_sources += ['udev-builtin-kmod.c'] |
5c23128d ZJS |
41 | endif |
42 | ||
2c201c21 | 43 | if conf.get('HAVE_BLKID', false) |
37efbbd8 | 44 | libudev_core_sources += ['udev-builtin-blkid.c'] |
5c23128d ZJS |
45 | endif |
46 | ||
2c201c21 | 47 | if conf.get('HAVE_ACL', false) |
37efbbd8 ZJS |
48 | libudev_core_sources += ['udev-builtin-uaccess.c', |
49 | logind_acl_c, | |
50 | sd_login_c] | |
5c23128d ZJS |
51 | endif |
52 | ||
53 | ############################################################ | |
54 | ||
55 | generate_keyboard_keys_list = find_program('generate-keyboard-keys-list.sh') | |
56 | keyboard_keys_list_txt = custom_target( | |
37efbbd8 ZJS |
57 | 'keyboard-keys-list.txt', |
58 | output : 'keyboard-keys-list.txt', | |
59 | command : [generate_keyboard_keys_list, cpp], | |
60 | capture : true) | |
5c23128d ZJS |
61 | |
62 | fname = 'keyboard-keys-from-name.gperf' | |
63 | gperf_file = custom_target( | |
37efbbd8 ZJS |
64 | fname, |
65 | input : keyboard_keys_list_txt, | |
66 | output : fname, | |
67 | command : [generate_gperfs, 'key', '', '@INPUT@'], | |
68 | capture : true) | |
5c23128d ZJS |
69 | |
70 | fname = 'keyboard-keys-from-name.h' | |
71 | keyboard_keys_from_name_h = custom_target( | |
37efbbd8 ZJS |
72 | fname, |
73 | input : gperf_file, | |
74 | output : fname, | |
75 | command : [gperf, | |
76 | '-L', 'ANSI-C', '-t', '--ignore-case', | |
77 | '-N', 'keyboard_lookup_key', | |
78 | '-H', 'hash_key_name', | |
79 | '-p', '-C', | |
80 | '@INPUT@'], | |
81 | capture : true) | |
5c23128d ZJS |
82 | |
83 | ############################################################ | |
84 | ||
85 | link_config_gperf_c = custom_target( | |
37efbbd8 ZJS |
86 | 'link-config-gperf.c', |
87 | input : 'net/link-config-gperf.gperf', | |
88 | output : 'link-config-gperf.c', | |
89 | command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) | |
5c23128d ZJS |
90 | |
91 | ############################################################ | |
92 | ||
3a30f21f | 93 | if get_option('link-udev-shared') |
1aec3ed9 ZJS |
94 | udev_link_with = [libshared] |
95 | udev_rpath = rootlibexecdir | |
3a30f21f | 96 | else |
1aec3ed9 ZJS |
97 | udev_link_with = [libshared_static, |
98 | libsystemd_internal] | |
99 | udev_rpath = '' | |
3a30f21f ZJS |
100 | endif |
101 | ||
aac26058 | 102 | libudev_internal = static_library( |
37efbbd8 ZJS |
103 | 'udev', |
104 | libudev_sources, | |
105 | include_directories : includes, | |
1aec3ed9 | 106 | link_with : udev_link_with) |
aac26058 | 107 | |
69e96427 | 108 | libudev_core_includes = [includes, include_directories('net')] |
5c23128d | 109 | libudev_core = static_library( |
37efbbd8 ZJS |
110 | 'udev-core', |
111 | libudev_core_sources, | |
112 | link_config_gperf_c, | |
113 | keyboard_keys_from_name_h, | |
114 | include_directories : libudev_core_includes, | |
1aec3ed9 ZJS |
115 | link_with : udev_link_with, |
116 | dependencies : [libblkid]) | |
3a30f21f ZJS |
117 | |
118 | foreach prog : [['ata_id/ata_id.c'], | |
119 | ['cdrom_id/cdrom_id.c'], | |
120 | ['collect/collect.c'], | |
121 | ['scsi_id/scsi_id.c', | |
122 | 'scsi_id/scsi_id.h', | |
123 | 'scsi_id/scsi_serial.c', | |
124 | 'scsi_id/scsi.h'], | |
125 | ['v4l_id/v4l_id.c'], | |
126 | ['mtd_probe/mtd_probe.c', | |
127 | 'mtd_probe/mtd_probe.h', | |
128 | 'mtd_probe/probe_smartmedia.c']] | |
129 | ||
37efbbd8 ZJS |
130 | executable(prog[0].split('/')[0], |
131 | prog, | |
132 | include_directories : includes, | |
133 | link_with : [libudev_internal], | |
1aec3ed9 | 134 | install_rpath : udev_rpath, |
37efbbd8 ZJS |
135 | install : true, |
136 | install_dir : udevlibexecdir) | |
3a30f21f | 137 | endforeach |
5c23128d ZJS |
138 | |
139 | install_data('udev.conf', | |
e17e5ba9 | 140 | install_dir : join_paths(sysconfdir, 'udev')) |
5c23128d ZJS |
141 | |
142 | udev_pc = configure_file( | |
37efbbd8 ZJS |
143 | input : 'udev.pc.in', |
144 | output : 'udev.pc', | |
145 | configuration : substs) | |
5c23128d ZJS |
146 | install_data(udev_pc, |
147 | install_dir : pkgconfigdatadir) | |
94e75a54 ZJS |
148 | |
149 | meson.add_install_script('sh', '-c', | |
e17e5ba9 | 150 | mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d'))) |