Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision cb9313e8da64558473ca8fdf6c8c48d6f75b0b96)
+++ uspace/Makefile	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -220,4 +220,9 @@
 endif
 
+## build keyboard layouts
+ifeq ($(CONFIG_RTLD),y)
+	DIRS += srv/hid/input/layout
+endif
+
 ## System libraries
 #
Index: uspace/srv/hid/input/Makefile
===================================================================
--- uspace/srv/hid/input/Makefile	(revision cb9313e8da64558473ca8fdf6c8c48d6f75b0b96)
+++ uspace/srv/hid/input/Makefile	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -53,5 +53,3 @@
 	stroke.c
 
-
 include $(USPACE_PREFIX)/Makefile.common
-
Index: uspace/srv/hid/input/layout/Makefile
===================================================================
--- uspace/srv/hid/input/layout/Makefile	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/Makefile	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -0,0 +1,16 @@
+.PHONY: all clean fasterclean all-test
+
+FILES := $(wildcard *.c)
+LAYOUTS := $(patsubst %.c, %, ${FILES}) 
+
+all:
+	$(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;)
+	
+
+clean:
+	$(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;)
+
+fasterclean:
+	$(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;)
+
+all-test:
Index: uspace/srv/hid/input/layout/Makefile.helper
===================================================================
--- uspace/srv/hid/input/layout/Makefile.helper	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
+++ uspace/srv/hid/input/layout/Makefile.helper	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -0,0 +1,8 @@
+
+USPACE_PREFIX = ../../../..
+
+LIBRARY = $(LAYOUT)
+SOVERSION = 0.0
+SOURCES = $(LAYOUT).c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hid/input/layout/ar.c
===================================================================
--- uspace/srv/hid/input/layout/ar.c	(revision cb9313e8da64558473ca8fdf6c8c48d6f75b0b96)
+++ uspace/srv/hid/input/layout/ar.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -54,4 +54,16 @@
 };
 
+#else
+
+layout_ops_t get_layout(void);
+layout_ops_t get_layout(void) {
+	layout_ops_t layout_default = {
+		.create = ar_create,
+		.destroy = ar_destroy,
+		.parse_ev = ar_parse_ev
+	};
+	return layout_default;
+}
+
 #endif
 
Index: uspace/srv/hid/input/layout/cz.c
===================================================================
--- uspace/srv/hid/input/layout/cz.c	(revision cb9313e8da64558473ca8fdf6c8c48d6f75b0b96)
+++ uspace/srv/hid/input/layout/cz.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -57,5 +57,5 @@
 } layout_cz_t;
 
-#ifdef CONFIG_KB_LAYOUT_us_qwerty
+#ifdef CONFIG_KB_LAYOUT_cz
 
 layout_ops_t layout_default = {
@@ -64,4 +64,16 @@
 	.parse_ev = cz_parse_ev
 };
+
+#else
+
+layout_ops_t get_layout(void);
+layout_ops_t get_layout(void) {
+	layout_ops_t layout_default = {
+		.create = cz_create,
+		.destroy = cz_destroy,
+		.parse_ev = cz_parse_ev
+	};
+	return layout_default;
+}
 
 #endif
Index: uspace/srv/hid/input/layout/us_dvorak.c
===================================================================
--- uspace/srv/hid/input/layout/us_dvorak.c	(revision cb9313e8da64558473ca8fdf6c8c48d6f75b0b96)
+++ uspace/srv/hid/input/layout/us_dvorak.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -53,4 +53,16 @@
 };
 
+#else
+
+layout_ops_t get_layout(void);
+layout_ops_t get_layout(void) {
+	layout_ops_t layout_default = {
+		.create = us_dvorak_create,
+		.destroy = us_dvorak_destroy,
+		.parse_ev = us_dvorak_parse_ev
+	};
+	return layout_default;
+}
+
 #endif
 
Index: uspace/srv/hid/input/layout/us_qwerty.c
===================================================================
--- uspace/srv/hid/input/layout/us_qwerty.c	(revision cb9313e8da64558473ca8fdf6c8c48d6f75b0b96)
+++ uspace/srv/hid/input/layout/us_qwerty.c	(revision 3e1bc3546ea213729dee23c73de611ea2141e305)
@@ -53,4 +53,16 @@
 };
 
+#else
+
+layout_ops_t get_layout(void);
+layout_ops_t get_layout(void) {
+	layout_ops_t layout_default = {
+		.create = us_qwerty_create,
+		.destroy = us_qwerty_destroy,
+		.parse_ev = us_qwerty_parse_ev
+	};
+	return layout_default;
+}
+
 #endif
 
