chiark / gitweb /
rules: move input_id to default rules
[elogind.git] / Makefile.am
1 # ------------------------------------------------------------------------------
2 # Copyright (C) 2008-2009 Kay Sievers <kay.sievers@vrfy.org>
3 # Copyright (C) 2009 Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
4 # ------------------------------------------------------------------------------
5
6 SUBDIRS = .
7
8 EXTRA_DIST = autogen.sh
9
10 ACLOCAL_AMFLAGS = -I m4
11
12 AM_MAKEFLAGS = --no-print-directory
13
14 AM_CPPFLAGS = \
15         -include $(top_builddir)/config.h \
16         -I$(top_srcdir)/libudev \
17         -DSYSCONFDIR=\""$(sysconfdir)"\" \
18         -DLIBEXECDIR=\""$(libexecdir)"\"
19
20 AM_CFLAGS = \
21         -fvisibility=hidden \
22         -ffunction-sections \
23         -fdata-sections
24
25 AM_LDFLAGS = \
26         -Wl,--gc-sections \
27         -Wl,--as-needed
28
29 DISTCHECK_CONFIGURE_FLAGS = \
30         --enable-gtk-doc \
31         --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
32
33 CLEANFILES =
34 BUILT_SOURCES =
35 INSTALL_EXEC_HOOKS =
36 INSTALL_DATA_HOOKS =
37 UNINSTALL_EXEC_HOOKS =
38 DISTCHECK_HOOKS =
39 dist_libexec_SCRIPTS =
40
41 # ------------------------------------------------------------------------------
42 # libudev
43 # ------------------------------------------------------------------------------
44 LIBUDEV_CURRENT=12
45 LIBUDEV_REVISION=1
46 LIBUDEV_AGE=12
47
48 SUBDIRS += libudev/docs
49
50 include_HEADERS = libudev/libudev.h
51 lib_LTLIBRARIES = libudev/libudev.la
52
53 libudev_libudev_la_SOURCES =\
54         libudev/libudev-private.h \
55         libudev/libudev.c \
56         libudev/libudev-list.c \
57         libudev/libudev-util.c \
58         libudev/libudev-device.c \
59         libudev/libudev-enumerate.c \
60         libudev/libudev-monitor.c \
61         libudev/libudev-queue.c
62
63 libudev_libudev_la_LDFLAGS = \
64         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE)
65
66 noinst_LTLIBRARIES = \
67         libudev/libudev-private.la
68
69 libudev_libudev_private_la_SOURCES =\
70         $(libudev_libudev_la_SOURCES) \
71         libudev/libudev-util-private.c \
72         libudev/libudev-device-private.c \
73         libudev/libudev-queue-private.c
74
75 if WITH_SELINUX
76 libudev_libudev_private_la_SOURCES += libudev/libudev-selinux-private.c
77 libudev_libudev_private_la_LIBADD = $(SELINUX_LIBS)
78 endif
79
80 pkgconfigdir = $(libdir)/pkgconfig
81 pkgconfig_DATA = libudev/libudev.pc
82
83 EXTRA_DIST += libudev/COPYING
84 # move lib from $(libdir) to $(rootlib_execdir) and update devel link, if needed
85 libudev-install-move-hook:
86         if test "$(libdir)" != "$(rootlib_execdir)"; then \
87                 mkdir -p $(DESTDIR)$(rootlib_execdir) && \
88                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
89                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
90                 ln -sf $$so_img_rel_target_prefix$(rootlib_execdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
91                 mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlib_execdir); \
92         fi
93
94 libudev-uninstall-move-hook:
95         rm -f $(DESTDIR)$(rootlib_execdir)/libudev.so*
96
97 INSTALL_EXEC_HOOKS += libudev-install-move-hook
98 UNINSTALL_EXEC_HOOKS += libudev-uninstall-move-hook
99
100 # ------------------------------------------------------------------------------
101 # main udev
102 # ------------------------------------------------------------------------------
103 udev-confdirs:
104         -mkdir -p $(DESTDIR)$(sysconfdir)/udev/rules.d
105         -mkdir -p $(DESTDIR)$(libexecdir)/devices
106
107 INSTALL_DATA_HOOKS += udev-confdirs
108
109 EXTRA_DIST += \
110         rules/arch \
111         rules/misc
112
113 udevrulesdir = $(libexecdir)/rules.d
114 dist_udevrules_DATA = \
115         rules/rules.d/50-udev-default.rules \
116         rules/rules.d/60-persistent-storage.rules \
117         rules/rules.d/60-persistent-storage-tape.rules \
118         rules/rules.d/60-persistent-serial.rules \
119         rules/rules.d/60-persistent-input.rules \
120         rules/rules.d/60-persistent-alsa.rules \
121         rules/rules.d/80-drivers.rules \
122         rules/rules.d/95-udev-late.rules
123
124 udevconfdir = $(sysconfdir)/udev
125 dist_udevconf_DATA = udev.conf
126
127 sharepkgconfigdir = $(datadir)/pkgconfig
128 sharepkgconfig_DATA = udev/udev.pc
129
130 if WITH_SYSTEMD
131 systemdsystemunit_DATA = \
132         init/udev-control.socket \
133         init/udev-kernel.socket \
134         init/udev.service \
135         init/udev-trigger.service \
136         init/udev-settle.service
137
138 EXTRA_DIST += \
139         init/udev-control.socket \
140         init/udev-kernel.socket
141
142 systemd-install-hook:
143         mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
144         ln -sf ../udev-control.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/udev-control.socket
145         ln -sf ../udev-kernel.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/udev-kernel.socket
146         mkdir -p $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants
147         ln -sf ../udev.service $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants/udev.service
148         ln -sf ../udev-trigger.service $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants/udev-trigger.service
149
150 INSTALL_DATA_HOOKS += systemd-install-hook
151 endif
152
153 sbin_PROGRAMS = \
154         udev/udevd \
155         udev/udevadm
156
157 udev_common_sources =\
158         udev/udev.h \
159         udev/udev-event.c \
160         udev/udev-watch.c \
161         udev/udev-node.c \
162         udev/udev-rules.c \
163         udev/udev-ctrl.c
164
165 udev_udevd_SOURCES = \
166         $(udev_common_sources) \
167         udev/udevd.c \
168         udev/sd-daemon.h \
169         udev/sd-daemon.c
170 udev_udevd_LDADD = libudev/libudev-private.la
171
172 udev_udevadm_SOURCES = \
173         $(udev_common_sources) \
174         udev/udevadm.c \
175         udev/udevadm-info.c \
176         udev/udevadm-control.c \
177         udev/udevadm-test.c \
178         udev/udevadm-monitor.c \
179         udev/udevadm-settle.c \
180         udev/udevadm-trigger.c
181 udev_udevadm_LDADD = libudev/libudev-private.la
182
183 # ------------------------------------------------------------------------------
184 # udev man pages
185 # ------------------------------------------------------------------------------
186 dist_man_MANS = \
187         udev/udev.7 \
188         udev/udevadm.8 \
189         udev/udevd.8
190
191 dist_noinst_DATA = \
192         udev/udev.html \
193         udev/udevadm.html \
194         udev/udevd.html
195
196 EXTRA_DIST += \
197         udev/udev.xml \
198         udev/udevadm.xml \
199         udev/udevd.xml
200
201 udev/%.7 udev/%.8 : udev/%.xml
202         $(AM_V_GEN)$(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
203
204 udev/%.html : udev/%.xml
205         $(AM_V_GEN)$(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
206
207 # ------------------------------------------------------------------------------
208 # udev tests
209 # ------------------------------------------------------------------------------
210 TESTS = test/udev-test.pl test/rules-test.sh
211
212 check_PROGRAMS = \
213         libudev/test-libudev \
214         udev/test-udev
215
216 libudev_test_libudev_SOURCES = libudev/test-libudev.c
217 libudev_test_libudev_LDADD = libudev/libudev.la
218
219 udev_test_udev_SOURCES = \
220         $(udev_common_sources) \
221         udev/test-udev.c
222 udev_test_udev_LDADD = libudev/libudev-private.la
223
224 # ------------------------------------------------------------------------------
225 # firmware - firmware loading
226 # ------------------------------------------------------------------------------
227 extras_firmware_firmware_SOURCES = extras/firmware/firmware.c
228 extras_firmware_firmware_LDADD = libudev/libudev-private.la
229 extras_firmware_firmware_CPPFLAGS = $(AM_CPPFLAGS) -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
230 dist_udevrules_DATA += extras/firmware/50-firmware.rules
231 libexec_PROGRAMS = extras/firmware/firmware
232
233 # ------------------------------------------------------------------------------
234 # ata_id - ATA identify
235 # ------------------------------------------------------------------------------
236 extras_ata_id_ata_id_SOURCES = extras/ata_id/ata_id.c
237 extras_ata_id_ata_id_LDADD = libudev/libudev-private.la
238 libexec_PROGRAMS += extras/ata_id/ata_id
239
240 # ------------------------------------------------------------------------------
241 # cdrom_id - optical drive/media capability
242 # ------------------------------------------------------------------------------
243 extras_cdrom_id_cdrom_id_SOURCES = extras/cdrom_id/cdrom_id.c
244 extras_cdrom_id_cdrom_id_LDADD = libudev/libudev-private.la
245 libexec_PROGRAMS += extras/cdrom_id/cdrom_id
246 dist_udevrules_DATA += extras/cdrom_id/60-cdrom_id.rules
247
248 # ------------------------------------------------------------------------------
249 # collect - trigger action when a collection of devices appeared
250 # ------------------------------------------------------------------------------
251 extras_collect_collect_SOURCES = extras/collect/collect.c
252 extras_collect_collect_LDADD = libudev/libudev-private.la
253 libexec_PROGRAMS += extras/collect/collect
254
255 # ------------------------------------------------------------------------------
256 # input_id - import input device class
257 # ------------------------------------------------------------------------------
258 extras_input_id_input_id_SOURCES = extras/input_id/input_id.c
259 extras_input_id_input_id_LDADD = libudev/libudev-private.la
260 libexec_PROGRAMS += extras/input_id/input_id
261
262 # ------------------------------------------------------------------------------
263 # path_id - compose identifier of persistent elements of the parent buses
264 # ------------------------------------------------------------------------------
265 extras_path_id_path_id_SOURCES = extras/path_id/path_id.c
266 extras_path_id_path_id_LDADD = libudev/libudev-private.la
267 libexec_PROGRAMS += extras/path_id/path_id
268
269 # ------------------------------------------------------------------------------
270 # scsi_id - SCSI inquiry to get various serial numbers
271 # ------------------------------------------------------------------------------
272 extras_scsi_id_scsi_id_SOURCES =\
273         extras/scsi_id/scsi_id.c \
274         extras/scsi_id/scsi_serial.c \
275         extras/scsi_id/scsi.h \
276         extras/scsi_id/scsi_id.h
277 extras_scsi_id_scsi_id_LDADD = libudev/libudev-private.la
278 libexec_PROGRAMS += extras/scsi_id/scsi_id
279 dist_man_MANS += extras/scsi_id/scsi_id.8
280 EXTRA_DIST += extras/scsi_id/README
281
282 # ------------------------------------------------------------------------------
283 # usb_id - USB device property import
284 # ------------------------------------------------------------------------------
285 extras_usb_id_usb_id_SOURCES = extras/usb_id/usb_id.c
286 extras_usb_id_usb_id_LDADD = libudev/libudev-private.la
287 libexec_PROGRAMS += extras/usb_id/usb_id
288
289 # ------------------------------------------------------------------------------
290 # v4l_id - video4linux capabilities
291 # ------------------------------------------------------------------------------
292 extras_v4l_id_v4l_id_SOURCES = extras/v4l_id/v4l_id.c
293 extras_v4l_id_v4l_id_LDADD = libudev/libudev-private.la
294 libexec_PROGRAMS += extras/v4l_id/v4l_id
295 dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules
296
297 # ------------------------------------------------------------------------------
298 # accelerometer - updates device orientation
299 # ------------------------------------------------------------------------------
300 extras_accelerometer_accelerometer_SOURCES = extras/accelerometer/accelerometer.c
301 extras_accelerometer_accelerometer_LDADD = libudev/libudev-private.la -lm
302 libexec_PROGRAMS += extras/accelerometer/accelerometer
303 dist_udevrules_DATA += extras/accelerometer/61-accelerometer.rules
304
305 # ------------------------------------------------------------------------------
306 # qemu -- qemu/kvm guest tweaks
307 # ------------------------------------------------------------------------------
308 dist_udevrules_DATA += extras/qemu/42-qemu-usb.rules
309
310 if ENABLE_GUDEV
311 # ------------------------------------------------------------------------------
312 # GUdev - libudev gobject interface
313 # ------------------------------------------------------------------------------
314 LIBGUDEV_CURRENT=1
315 LIBGUDEV_REVISION=0
316 LIBGUDEV_AGE=1
317
318 SUBDIRS += extras/gudev/docs
319
320 libgudev_includedir=$(includedir)/gudev-1.0/gudev
321 libgudev_include_HEADERS = \
322         extras/gudev/gudev.h \
323         extras/gudev/gudevenums.h \
324         extras/gudev/gudevenumtypes.h \
325         extras/gudev/gudevtypes.h \
326         extras/gudev/gudevclient.h \
327         extras/gudev/gudevdevice.h \
328         extras/gudev/gudevenumerator.h
329
330 lib_LTLIBRARIES += extras/gudev/libgudev-1.0.la
331 pkgconfig_DATA += extras/gudev/gudev-1.0.pc
332
333 extras_gudev_libgudev_1_0_la_SOURCES = \
334         extras/gudev/gudevenums.h \
335         extras/gudev/gudevenumtypes.h \
336         extras/gudev/gudevenumtypes.h\
337         extras/gudev/gudevtypes.h \
338         extras/gudev/gudevclient.h \
339         extras/gudev/gudevclient.c \
340         extras/gudev/gudevdevice.h \
341         extras/gudev/gudevdevice.c \
342         extras/gudev/gudevenumerator.h \
343         extras/gudev/gudevenumerator.c \
344         extras/gudev/gudevprivate.h
345
346 dist_extras_gudev_libgudev_1_0_la_SOURCES = \
347         extras/gudev/gudevmarshal.h \
348         extras/gudev/gudevmarshal.c \
349         extras/gudev/gudevenumtypes.h \
350         extras/gudev/gudevenumtypes.c
351 BUILT_SOURCES += $(dist_extras_gudev_libgudev_1_0_la_SOURCES)
352
353 extras_gudev_libgudev_1_0_la_CPPFLAGS = \
354         $(AM_CPPFLAGS) \
355         -I$(top_builddir)/extras \
356         -I$(top_srcdir)/extras \
357         -I$(top_builddir)/extras/gudev \
358         -I$(top_srcdir)/extras/gudev \
359         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
360         -D_GUDEV_COMPILATION \
361         -DG_LOG_DOMAIN=\"GUdev\"
362
363 extras_gudev_libgudev_1_0_la_CFLAGS = \
364         -fvisibility=default \
365         $(GLIB_CFLAGS)
366
367 extras_gudev_libgudev_1_0_la_LIBADD = libudev/libudev.la $(GLIB_LIBS)
368
369 extras_gudev_libgudev_1_0_la_LDFLAGS = \
370         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
371         -export-dynamic -no-undefined \
372         -export-symbols-regex '^g_udev_.*'
373
374 EXTRA_DIST += \
375         extras/gudev/COPYING \
376         extras/gudev/gudevmarshal.list \
377         extras/gudev/gudevenumtypes.h.template \
378         extras/gudev/gudevenumtypes.c.template \
379         extras/gudev/gjs-example.js \
380         extras/gudev/seed-example-enum.js \
381         extras/gudev/seed-example.js
382
383 extras/gudev/gudevmarshal.h: extras/gudev/gudevmarshal.list
384         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
385
386 extras/gudev/gudevmarshal.c: extras/gudev/gudevmarshal.list
387         $(AM_V_GEN)echo "#include \"gudevmarshal.h\"" > $@ && \
388         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
389
390 extras/gudev/gudevenumtypes.h: extras/gudev/gudevenumtypes.h.template extras/gudev/gudevenums.h
391         $(AM_V_GEN)glib-mkenums --template $^ > \
392             $@.tmp && mv $@.tmp $@
393
394 extras/gudev/gudevenumtypes.c: extras/gudev/gudevenumtypes.c.template extras/gudev/gudevenums.h
395         $(AM_V_GEN)glib-mkenums --template $^ > \
396             $@.tmp && mv $@.tmp $@
397
398 if ENABLE_INTROSPECTION
399 extras/gudev/GUdev-1.0.gir: extras/gudev/libgudev-1.0.la $(G_IR_SCANNER)
400         $(AM_V_GEN)$(G_IR_SCANNER) -v \
401                 --warn-all \
402                 --namespace GUdev \
403                 --nsversion=1.0 \
404                 --include=GObject-2.0 \
405                 --library=gudev-1.0 \
406                 --library-path=$(top_builddir)/libudev \
407                 --library-path=$(top_builddir)/extras/gudev \
408                 --output $@ \
409                 --pkg=glib-2.0 \
410                 --pkg=gobject-2.0 \
411                 -I$(top_srcdir)/extras \
412                 -I$(top_builddir)/extras \
413                 -D_GUDEV_COMPILATION \
414                 -D_GUDEV_WORK_AROUND_DEV_T_BUG \
415                 $(top_srcdir)/extras/gudev/gudev.h \
416                 $(top_srcdir)/extras/gudev/gudevtypes.h \
417                 $(top_srcdir)/extras/gudev/gudevenums.h \
418                 $(or $(wildcard $(top_builddir)/extras/gudev/gudevenumtypes.h),$(top_srcdir)/extras/gudev/gudevenumtypes.h) \
419                 $(top_srcdir)/extras/gudev/gudevclient.h \
420                 $(top_srcdir)/extras/gudev/gudevdevice.h \
421                 $(top_srcdir)/extras/gudev/gudevenumerator.h \
422                 $(top_srcdir)/extras/gudev/gudevclient.c \
423                 $(top_srcdir)/extras/gudev/gudevdevice.c \
424                 $(top_srcdir)/extras/gudev/gudevenumerator.c
425
426 extras/gudev/GUdev-1.0.typelib: extras/gudev/GUdev-1.0.gir $(G_IR_COMPILER)
427         $(AM_V_GEN)g-ir-compiler $< -o $@
428
429 girdir = $(GIRDIR)
430 gir_DATA = extras/gudev/GUdev-1.0.gir
431
432 typelibsdir = $(GIRTYPELIBDIR)
433 typelibs_DATA = extras/gudev/GUdev-1.0.typelib
434
435 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
436 endif # ENABLE_INTROSPECTION
437
438 # move lib from $(libdir) to $(rootlib_execdir) and update devel link, if needed
439 libgudev-install-move-hook:
440         if test "$(libdir)" != "$(rootlib_execdir)"; then \
441                 mkdir -p $(DESTDIR)$(rootlib_execdir) && \
442                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libgudev-1.0.so) && \
443                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
444                 ln -sf $$so_img_rel_target_prefix$(rootlib_execdir)/$$so_img_name $(DESTDIR)$(libdir)/libgudev-1.0.so && \
445                 mv $(DESTDIR)$(libdir)/libgudev-1.0.so.* $(DESTDIR)$(rootlib_execdir); \
446         fi
447
448 libgudev-uninstall-move-hook:
449         rm -f $(DESTDIR)$(rootlib_execdir)/libgudev-1.0.so*
450
451 INSTALL_EXEC_HOOKS += libgudev-install-move-hook
452 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-move-hook
453 endif
454
455 if ENABLE_HWDB
456 # ------------------------------------------------------------------------------
457 # usb/pci-db - read vendor/device string database
458 # ------------------------------------------------------------------------------
459 extras_usb_db_usb_db_SOURCES = extras/usb-db/usb-db.c
460 extras_usb_db_usb_db_CPPFLAGS = $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
461 extras_usb_db_usb_db_LDADD = libudev/libudev-private.la
462 libexec_PROGRAMS += extras/usb-db/usb-db
463 dist_udevrules_DATA += \
464         rules/rules.d/75-net-description.rules \
465         rules/rules.d/75-tty-description.rules \
466         rules/rules.d/78-sound-card.rules
467
468 extras_usb_db_pci_db_SOURCES = extras/usb-db/usb-db.c
469 extras_usb_db_pci_db_CPPFLAGS = $(AM_CPPFLAGS) -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI
470 extras_usb_db_pci_db_LDADD = libudev/libudev-private.la
471 libexec_PROGRAMS += extras/usb-db/pci-db
472 endif
473
474 if ENABLE_KEYMAP
475 # ------------------------------------------------------------------------------
476 # keymap - map custom hardware's multimedia keys
477 # ------------------------------------------------------------------------------
478 extras_keymap_keymap_SOURCES = extras/keymap/keymap.c
479 extras_keymap_keymap_CPPFLAGS = $(AM_CPPFLAGS) -I extras/keymap
480 nodist_extras_keymap_keymap_SOURCES = \
481         extras/keymap/keys-from-name.h \
482         extras/keymap/keys-to-name.h
483 BUILT_SOURCES += $(nodist_extras_keymap_keymap_SOURCES)
484
485 EXTRA_DIST += extras/keymap/check-keymaps.sh
486 dist_udevrules_DATA += extras/keymap/95-keymap.rules
487 dist_udevrules_DATA += extras/keymap/95-keyboard-force-release.rules
488 libexec_PROGRAMS += extras/keymap/keymap
489 dist_libexec_SCRIPTS += extras/keymap/findkeyboards
490 dist_libexec_SCRIPTS += extras/keymap/keyboard-force-release.sh
491 dist_doc_DATA = extras/keymap/README.keymap.txt
492 CLEANFILES += \
493         extras/keymap/keys.txt \
494         extras/keymap/keys-from-name.gperf
495
496 udevkeymapdir = $(libexecdir)/keymaps
497 dist_udevkeymap_DATA = \
498         extras/keymap/keymaps/acer \
499         extras/keymap/keymaps/acer-aspire_5720 \
500         extras/keymap/keymaps/acer-aspire_8930 \
501         extras/keymap/keymaps/acer-aspire_5920g \
502         extras/keymap/keymaps/acer-aspire_6920 \
503         extras/keymap/keymaps/acer-travelmate_c300 \
504         extras/keymap/keymaps/asus \
505         extras/keymap/keymaps/compaq-e_evo \
506         extras/keymap/keymaps/dell \
507         extras/keymap/keymaps/dell-latitude-xt2 \
508         extras/keymap/keymaps/everex-xt5000 \
509         extras/keymap/keymaps/fujitsu-amilo_pa_2548 \
510         extras/keymap/keymaps/fujitsu-amilo_pro_edition_v3505 \
511         extras/keymap/keymaps/fujitsu-amilo_pro_v3205 \
512         extras/keymap/keymaps/fujitsu-amilo_si_1520 \
513         extras/keymap/keymaps/fujitsu-esprimo_mobile_v5 \
514         extras/keymap/keymaps/fujitsu-esprimo_mobile_v6 \
515         extras/keymap/keymaps/hewlett-packard \
516         extras/keymap/keymaps/hewlett-packard-2510p_2530p \
517         extras/keymap/keymaps/hewlett-packard-compaq_elitebook \
518         extras/keymap/keymaps/hewlett-packard-pavilion \
519         extras/keymap/keymaps/hewlett-packard-presario-2100 \
520         extras/keymap/keymaps/hewlett-packard-tablet \
521         extras/keymap/keymaps/hewlett-packard-tx2 \
522         extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
523         extras/keymap/keymaps/inventec-symphony_6.0_7.0 \
524         extras/keymap/keymaps/lenovo-3000 \
525         extras/keymap/keymaps/lenovo-ideapad \
526         extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
527         extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \
528         extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \
529         extras/keymap/keymaps/lg-x110 \
530         extras/keymap/keymaps/logitech-wave \
531         extras/keymap/keymaps/logitech-wave-cordless \
532         extras/keymap/keymaps/logitech-wave-pro-cordless \
533         extras/keymap/keymaps/maxdata-pro_7000 \
534         extras/keymap/keymaps/medion-fid2060 \
535         extras/keymap/keymaps/medionnb-a555 \
536         extras/keymap/keymaps/micro-star \
537         extras/keymap/keymaps/module-asus-w3j \
538         extras/keymap/keymaps/module-ibm \
539         extras/keymap/keymaps/module-lenovo \
540         extras/keymap/keymaps/module-sony \
541         extras/keymap/keymaps/module-sony-old \
542         extras/keymap/keymaps/module-sony-vgn \
543         extras/keymap/keymaps/olpc-xo \
544         extras/keymap/keymaps/onkyo \
545         extras/keymap/keymaps/oqo-model2 \
546         extras/keymap/keymaps/samsung-other \
547         extras/keymap/keymaps/samsung-sq1us \
548         extras/keymap/keymaps/samsung-sx20s \
549         extras/keymap/keymaps/toshiba-satellite_a100 \
550         extras/keymap/keymaps/toshiba-satellite_a110 \
551         extras/keymap/keymaps/toshiba-satellite_m30x \
552         extras/keymap/keymaps/zepto-znote
553
554 udevkeymapforcereldir = $(libexecdir)/keymaps/force-release
555 dist_udevkeymapforcerel_DATA = \
556         extras/keymap/force-release-maps/dell-touchpad \
557         extras/keymap/force-release-maps/hp-other \
558         extras/keymap/force-release-maps/samsung-other \
559         extras/keymap/force-release-maps/common-volume-keys
560
561 extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h
562         $(AM_V_at)mkdir -p extras/keymap
563         $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
564
565 extras/keymap/keys-from-name.gperf: extras/keymap/keys.txt
566         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
567
568 extras/keymap/keys-from-name.h: extras/keymap/keys-from-name.gperf Makefile
569         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
570
571 extras/keymap/keys-to-name.h: extras/keymap/keys.txt Makefile
572         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
573
574 keymaps-distcheck-hook: extras/keymap/keys.txt
575         $(top_srcdir)/extras/keymap/check-keymaps.sh $(top_srcdir) $^
576 DISTCHECK_HOOKS += keymaps-distcheck-hook
577 endif
578
579 if ENABLE_MTD_PROBE
580 # ------------------------------------------------------------------------------
581 # mtd_probe - autoloads FTL module for mtd devices
582 # ------------------------------------------------------------------------------
583 extras_mtd_probe_mtd_probe_SOURCES =  \
584         extras/mtd_probe/mtd_probe.c \
585         extras/mtd_probe/mtd_probe.h \
586         extras/mtd_probe/probe_smartmedia.c
587 extras_mtd_probe_mtd_probe_CPPFLAGS = $(AM_CPPFLAGS)
588 dist_udevrules_DATA += extras/mtd_probe/75-probe_mtd.rules
589 libexec_PROGRAMS += extras/mtd_probe/mtd_probe
590 endif
591
592 if ENABLE_RULE_GENERATOR
593 # ------------------------------------------------------------------------------
594 # rule_generator - persistent network and optical device rule generator
595 # ------------------------------------------------------------------------------
596 dist_libexec_SCRIPTS += \
597         extras/rule_generator/write_cd_rules \
598         extras/rule_generator/write_net_rules
599
600 udevhomedir = $(libexecdir)
601 dist_udevhome_DATA = extras/rule_generator/rule_generator.functions
602
603 dist_udevrules_DATA += \
604         extras/rule_generator/75-cd-aliases-generator.rules \
605         extras/rule_generator/75-persistent-net-generator.rules
606 endif
607
608 if ENABLE_UDEV_ACL
609 # ------------------------------------------------------------------------------
610 # udev_acl - apply ACLs for users with local forground sessions
611 # ------------------------------------------------------------------------------
612 extras_udev_acl_udev_acl_SOURCES = extras/udev-acl/udev-acl.c
613 extras_udev_acl_udev_acl_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
614 extras_udev_acl_udev_acl_LDADD = libudev/libudev-private.la -lacl $(GLIB_LIBS)
615 dist_udevrules_DATA += extras/udev-acl/70-udev-acl.rules
616 libexec_PROGRAMS += extras/udev-acl/udev-acl
617
618 udevacl-install-hook:
619         mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d
620         ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck
621
622 INSTALL_EXEC_HOOKS += udevacl-install-hook
623 endif
624
625 if ENABLE_FLOPPY
626 # ------------------------------------------------------------------------------
627 # create_floppy_devices - historical floppy kernel device nodes (/dev/fd0h1440, ...)
628 # ------------------------------------------------------------------------------
629 extras_floppy_create_floppy_devices_SOURCES = extras/floppy/create_floppy_devices.c
630 extras_floppy_create_floppy_devices_LDADD = libudev/libudev-private.la
631 libexec_PROGRAMS += extras/floppy/create_floppy_devices
632 dist_udevrules_DATA += extras/floppy/60-floppy.rules
633 endif
634
635 if ENABLE_EDD
636 # ------------------------------------------------------------------------------
637 # edd_id - create /dev/disk/by-id/edd-* links for BIOS EDD data
638 # ------------------------------------------------------------------------------
639 extras_edd_id_edd_id_SOURCES = extras/edd_id/edd_id.c
640 extras_edd_id_edd_id_LDADD = libudev/libudev-private.la
641 libexec_PROGRAMS += extras/edd_id/edd_id
642 dist_udevrules_DATA += extras/edd_id/61-persistent-storage-edd.rules
643 endif
644
645 # ------------------------------------------------------------------------------
646 # install, uninstall, clean hooks
647 # ------------------------------------------------------------------------------
648 clean-local:
649         rm -rf udev-test-install
650
651 distclean-local:
652         rm -rf autom4te.cache
653
654 CLEANFILES += \
655         udev-$(VERSION).tar.gz \
656         udev-$(VERSION).tar.bz2 \
657         $(BUILT_SOURCES)
658
659 EXTRA_DIST += $(TESTS)
660 EXTRA_DIST += test/rule-syntax-check.py
661
662 install-exec-hook: $(INSTALL_EXEC_HOOKS)
663
664 install-data-hook: $(INSTALL_DATA_HOOKS)
665
666 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
667
668 distcheck-hook: $(DISTCHECK_HOOKS)
669
670 # ------------------------------------------------------------------------------
671 # custom release helpers
672 # ------------------------------------------------------------------------------
673 PREVIOUS_VERSION = `expr $(VERSION) - 1`
674 changelog:
675         @ head -1 ChangeLog | grep -q "to v$(PREVIOUS_VERSION)"
676         @ mv ChangeLog ChangeLog.tmp
677         @ echo "Summary of changes from v$(PREVIOUS_VERSION) to v$(VERSION)" >> ChangeLog
678         @ echo "============================================" >> ChangeLog
679         @ echo >> ChangeLog
680         @ git log --pretty=short $(PREVIOUS_VERSION)..HEAD | git shortlog  >> ChangeLog
681         @ echo >> ChangeLog
682         @ cat ChangeLog
683         @ cat ChangeLog.tmp >> ChangeLog
684         @ rm ChangeLog.tmp
685
686 test-install:
687         rm -rf $(PWD)/udev-test-install/
688         make DESTDIR=$(PWD)/udev-test-install install
689         tree $(PWD)/udev-test-install/
690
691 git-release:
692         head -1 ChangeLog | grep -q "to v$(VERSION)"
693         head -1 NEWS | grep -q "udev $(VERSION)"
694         git commit -a -m "release $(VERSION)"
695         git tag $(VERSION)
696         git gc --prune=0
697
698 git-sync:
699         git push
700         git push --tags $(VERSION)
701
702 tar-sync:
703         scp udev-$(VERSION).tar.gz master.kernel.org:/pub/linux/utils/kernel/hotplug/
704
705 doc-sync:
706         rsync -av udev/*.html master.kernel.org:/pub/linux/utils/kernel/hotplug/udev/
707         rsync -av --delete libudev/docs/html/ master.kernel.org:/pub/linux/utils/kernel/hotplug/libudev/
708         rsync -av --delete extras/gudev/docs/html/ master.kernel.org:/pub/linux/utils/kernel/hotplug/gudev/