# -*- Mode: makefile; indent-tabs-mode: t -*- # # This file is part of systemd. # # Copyright 2010-2012 Lennart Poettering # Copyright 2010-2012 Kay Sievers # Copyright 2013 Zbigniew Jędrzejewski-Szmek # Copyright 2013 David Strauss # Copyright 2016 Luke Shumaker # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # systemd is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk noinst_LTLIBRARIES += \ libudev-core.la $(outdir)/keyboard-keys-list.txt: | $(outdir)/$(DEPDIR) $(AM_V_GEN)$(CPP) $(sd.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: $(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: $(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 = \ src/udev/udev.h \ src/udev/udev-event.c \ src/udev/udev-watch.c \ src/udev/udev-node.c \ src/udev/udev-rules.c \ src/udev/udev-ctrl.c \ src/udev/udev-builtin.c \ src/udev/udev-builtin-btrfs.c \ src/udev/udev-builtin-hwdb.c \ src/udev/udev-builtin-input_id.c \ src/udev/udev-builtin-keyboard.c \ src/udev/udev-builtin-net_id.c \ src/udev/udev-builtin-net_setup_link.c \ src/udev/udev-builtin-path_id.c \ src/udev/udev-builtin-usb_id.c \ src/udev/net/link-config.h \ src/udev/net/link-config.c \ src/udev/net/ethtool-util.h \ src/udev/net/ethtool-util.c _nodist_libudev_core_la_SOURCES = \ src/udev/keyboard-keys-from-name.h \ src/udev/net/link-config-gperf.c gperf_gperf_sources += \ src/udev/net/link-config-gperf.gperf libudev_core_la_CFLAGS = \ $(BLKID_CFLAGS) \ $(KMOD_CFLAGS) libudev_core_la_LIBADD = \ libsystemd-internal.la \ libsystemd-basic.la \ libsystemd-staging.la \ libsystemd-network.la \ libsystemd-shared.la \ $(BLKID_LIBS) \ $(KMOD_LIBS) ifneq ($(HAVE_KMOD),) libudev_core_la_SOURCES += \ src/udev/udev-builtin-kmod.c endif # HAVE_KMOD ifneq ($(HAVE_BLKID),) libudev_core_la_SOURCES += \ src/udev/udev-builtin-blkid.c endif # HAVE_BLKID ifneq ($(HAVE_ACL),) libudev_core_la_SOURCES += \ src/udev/udev-builtin-uaccess.c \ src/login/logind-acl.c \ src/libsystemd/sd-login/sd-login.c \ src/systemd/sd-login.h endif # HAVE_ACL sd.libudev-core_SOURCES = $(patsubst src/udev/%,%,$(filter %.c,$(_libudev_core_la_SOURCES) $(_nodist_libudev_core_la_SOURCES))) $(outdir)/libudev-core.la: $(addprefix $(outdir)/,$(sd.libudev-core_SOURCES:.c=.lo)) $(outdir)/udev-builtin-keyboard.lo: $(outdir)/keyboard-keys-from-name.h sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" nested.subdirs += net include $(topsrcdir)/build-aux/Makefile.tail.mk