summaryrefslogtreecommitdiff
path: root/src/grp-udev/libudev-core/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-udev/libudev-core/Makefile')
-rw-r--r--src/grp-udev/libudev-core/Makefile19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/grp-udev/libudev-core/Makefile b/src/grp-udev/libudev-core/Makefile
index 34137d8494..56efd36aa6 100644
--- a/src/grp-udev/libudev-core/Makefile
+++ b/src/grp-udev/libudev-core/Makefile
@@ -27,19 +27,18 @@ noinst_LTLIBRARIES += \
libudev-core.la
$(outdir)/keyboard-keys-list.txt:
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@
+ $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@
-$(outdir)/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
+$(outdir)/keyboard-keys-from-name.gperf: $(outdir)/keyboard-keys-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
-$(outdir)/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
+$(outdir)/keyboard-keys-from-name.h: $(outdir)/keyboard-keys-from-name.gperf
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
gperf_txt_sources += \
src/udev/keyboard-keys-list.txt
-libudev_core_la_SOURCES = \
+_libudev_core_la_SOURCES = \
src/udev/udev.h \
src/udev/udev-event.c \
src/udev/udev-watch.c \
@@ -60,7 +59,7 @@ libudev_core_la_SOURCES = \
src/udev/net/ethtool-util.h \
src/udev/net/ethtool-util.c
-nodist_libudev_core_la_SOURCES = \
+_nodist_libudev_core_la_SOURCES = \
src/udev/keyboard-keys-from-name.h \
src/udev/net/link-config-gperf.c
@@ -99,4 +98,12 @@ libudev_core_la_SOURCES += \
src/systemd/sd-login.h
endif # HAVE_ACL
+libudev-core.la.SOURCES = $(patsubst src/udev/%,%,$(filter %.c,$(_libudev_core_la_SOURCES) $(_nodist_libudev_core_la_SOURCES)))
+libudev-core.la.DEPENDS = $(addprefix $(outdir)/,$(libudev-core.la.SOURCES:.c=.lo))
+at.subdirs += net
+$(outdir)/udev-builtin-keyboard.lo: $(outdir)/keyboard-keys-from-name.h
+systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-netlink
+systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-hwdb
+systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk