• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
2
3AM_CPPFLAGS = \
4	-include $(top_builddir)/config.h \
5	-DROOTPREFIX=\"$(rootprefix)\" \
6	-DUDEV_HWDB_DIR=\"$(udevhwdbdir)\" \
7	-DUDEV_HWDB_BIN=\"$(udevhwdbbin)\" \
8	-DUDEV_CONF_DIR=\"$(udevconfdir)\" \
9	-DUDEV_ROOT_RUN=\"$(rootrundir)\" \
10	-DUDEV_RULES_DIR=\"$(udevrulesdir)\" \
11	-DUDEV_LIBEXEC_DIR=\"$(udevlibexecdir)\" \
12	-DUDEV_VERSION=\"$(UDEV_VERSION)\" \
13	-I $(top_srcdir)/src/shared \
14	-I $(top_srcdir)/src/libudev
15
16bin_PROGRAMS = \
17	udevadm
18
19sbin_PROGRAMS = \
20	udevd
21
22udevd_SOURCES = \
23	udevd.c
24
25udevd_LDADD = \
26	libudev-core.la
27
28udevadm_SOURCES = \
29	udevadm.c \
30	udevadm-info.c \
31	udevadm-control.c \
32	udevadm-monitor.c \
33	udevadm-hwdb.c \
34	udevadm-settle.c \
35	udevadm-trigger.c \
36	udevadm-test.c \
37	udevadm-test-builtin.c \
38	udevadm-util.c \
39	udevadm-util.h
40
41
42udevadm_LDADD = \
43	libudev-core.la
44
45noinst_LTLIBRARIES = \
46        libudev-core.la
47
48libudev_core_la_SOURCES = \
49	udev-event.c \
50	udev-watch.c \
51	udev-node.c \
52	udev-rules.c \
53	udev-ctrl.c \
54	udev-builtin.c \
55	udev-builtin-btrfs.c \
56	udev-builtin-hwdb.c \
57	udev-builtin-input_id.c \
58	udev-builtin-net_id.c \
59	udev-builtin-path_id.c \
60	udev-builtin-usb_id.c
61
62include_HEADERS = \
63	udev.h
64
65libudev_core_la_CFLAGS = \
66	$(AM_CFLAGS) \
67	$(BLKID_CFLAGS)
68
69libudev_core_la_LIBADD = \
70	$(top_builddir)/src/shared/libudev_shared.la \
71	$(top_builddir)/src/libudev/libudev-private.la \
72	$(BLKID_LIBS) \
73	$(SELINUX_LIBS)
74
75if HAVE_BLKID
76libudev_core_la_SOURCES += \
77	udev-builtin-blkid.c
78endif
79
80if HAVE_KMOD
81libudev_core_la_SOURCES += \
82	udev-builtin-kmod.c
83libudev_core_la_CFLAGS += \
84	$(KMOD_CFLAGS)
85libudev_core_la_LIBADD += \
86	$(KMOD_LIBS)
87endif
88
89#
90# Extras
91#
92dist_udevconf_DATA = \
93	udev.conf
94
95sharepkgconfig_DATA = \
96	udev.pc
97
98EXTRA_DIST = \
99	udev.pc.in
100
101CLEANFILES = \
102	udev.pc
103
104
105AM_CPPFLAGS += \
106	-I $(top_builddir)/src/udev
107
108libudev_core_la_SOURCES += \
109	udev-builtin-keyboard.c
110
111nodist_libudev_core_la_SOURCES = \
112	keyboard-keys-from-name.h \
113	keyboard-keys-to-name.h
114
115keyboard-keys.txt: Makefile
116	$(AM_V_at)f="$@"; case $$f in */*) $(MKDIR_P) "$${f%/*}"; esac
117	$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
118
119keyboard-keys-from-name.gperf: keyboard-keys.txt Makefile
120	$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' keyboard-keys.txt > $@
121
122keyboard-keys-from-name.h: keyboard-keys-from-name.gperf Makefile
123	$(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < keyboard-keys-from-name.gperf > $@
124
125keyboard-keys-to-name.h: keyboard-keys.txt Makefile
126	$(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' keyboard-keys.txt > $@
127
128
129BUILT_SOURCES = \
130	$(nodist_libudev_core_la_SOURCES)
131
132CLEANFILES += \
133	keyboard-keys-from-name.gperf \
134	keyboard-keys.txt \
135	$(BUILT_SOURCES)
136
137# install udevadm symlink in sbindir
138install-exec-hook:
139	test "$(bindir)" = "$(sbindir)" || \
140		$(LN_S) -n -f $(bindir)/udevadm $(DESTDIR)$(sbindir)/udevadm
141
142uninstall-hook:
143	rm -Rf $(DESTDIR)$(sbindir)/udevadm
144