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