install:: $(foreach v,$(filter %_SCRIPTS,$(.VARIABLES)),$(patsubst %_SCRIPTS,install-SCRIPTS/%,$v))
+##
+## rules for *_HEADERS
+##
+
+install-HEADERS/%::
+ $(if $($*dir), $(INSTALL_DIR) $(DESTDIR)$($*dir))
+ $(if $($*dir), $(INSTALL_DATA) $($*_HEADERS) $(DESTDIR)$($*dir))
+
+install:: $(foreach v,$(filter %_HEADERS,$(.VARIABLES)),$(patsubst %_HEADERS,install-HEADERS/%,$v))
+
########################################################################}}}#
#[ Candy ]##############################################################{{{#
DISTCLEANFILES = madtty.pc
-pkgconfigdir=$(libdir)/pkgconfig
-pkgconfig_DATA = madtty.pc
+
+include_HEADERS = madtty.h
lib_LIBRARIES = libmadtty
libmadtty_SOURCES = inject.c inject_csi.c inject_csi.h madtty.h rote.c rote_keymap.c roteprivate.h
libmadtty_CPPFLAGS = -Wno-error
libmadtty_VERSION = @PACKAGE_VERSION@
-include $(DEPTH)/am/footer.mk
+pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA = madtty.pc
+
+include $(DEPTH)/am/footer.mk
# vim:set ft=automake: