desktop-shell: Move to new desktop-shell subdirectory
diff --git a/Makefile.am b/Makefile.am
index ab4308f..85d08e9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,7 @@
 	shared					\
 	src					\
 	$(xwayland_subdir)			\
+	desktop-shell				\
 	clients					\
 	data					\
 	protocol				\
diff --git a/configure.ac b/configure.ac
index fd7dc1f..86940d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -491,6 +491,7 @@
 		 shared/Makefile
 		 src/Makefile
 		 xwayland/Makefile
+		 desktop-shell/Makefile
 		 src/version.h
 		 src/weston.pc
 		 clients/Makefile
diff --git a/desktop-shell/Makefile.am b/desktop-shell/Makefile.am
new file mode 100644
index 0000000..5fb6414
--- /dev/null
+++ b/desktop-shell/Makefile.am
@@ -0,0 +1,35 @@
+moduledir = $(libdir)/weston
+module_LTLIBRARIES = $(desktop_shell)
+
+AM_CPPFLAGS =					\
+	-I$(top_srcdir)/shared			\
+	-I$(top_srcdir)/src			\
+	-DDATADIR='"$(datadir)"'		\
+	-DMODULEDIR='"$(moduledir)"'		\
+	-DLIBEXECDIR='"$(libexecdir)"'		\
+	-DIN_WESTON
+
+if ENABLE_DESKTOP_SHELL
+desktop_shell = desktop-shell.la
+desktop_shell_la_LDFLAGS = -module -avoid-version
+desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)	\
+	../shared/libshared.la
+desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
+desktop_shell_la_SOURCES =			\
+	shell.c					\
+	desktop-shell-protocol.c		\
+	desktop-shell-server-protocol.h 	\
+	xdg-shell-protocol.c			\
+	xdg-shell-server-protocol.h
+endif
+
+BUILT_SOURCES =					\
+	desktop-shell-protocol.c		\
+	desktop-shell-server-protocol.h		\
+	xdg-shell-protocol.c			\
+	xdg-shell-server-protocol.h
+
+CLEANFILES = $(BUILT_SOURCES)
+
+wayland_protocoldir = $(top_srcdir)/protocol
+include $(top_srcdir)/wayland-scanner.mk
diff --git a/src/shell.c b/desktop-shell/shell.c
similarity index 100%
rename from src/shell.c
rename to desktop-shell/shell.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 77df381..fa06d57 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,7 +107,6 @@
 
 moduledir = $(libdir)/weston
 module_LTLIBRARIES =				\
-	$(desktop_shell)			\
 	$(cms_static)				\
 	$(cms_colord)				\
 	$(gl_renderer)				\
@@ -277,20 +276,6 @@
 rdp_backend_la_SOURCES = compositor-rdp.c
 endif
 
-if ENABLE_DESKTOP_SHELL
-desktop_shell = desktop-shell.la
-desktop_shell_la_LDFLAGS = -module -avoid-version
-desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)	\
-	../shared/libshared.la
-desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
-desktop_shell_la_SOURCES =			\
-	shell.c					\
-	desktop-shell-protocol.c		\
-	desktop-shell-server-protocol.h 	\
-	xdg-shell-protocol.c			\
-	xdg-shell-server-protocol.h
-endif
-
 if HAVE_LCMS
 cms_static = cms-static.la
 cms_static_la_LDFLAGS = -module -avoid-version
@@ -328,16 +313,12 @@
 	screenshooter-protocol.c		\
 	text-cursor-position-server-protocol.h	\
 	text-cursor-position-protocol.c		\
-	desktop-shell-protocol.c		\
-	desktop-shell-server-protocol.h		\
 	text-protocol.c				\
 	text-server-protocol.h			\
 	input-method-protocol.c			\
 	input-method-server-protocol.h		\
 	workspaces-server-protocol.h		\
 	workspaces-protocol.c			\
-	xdg-shell-protocol.c			\
-	xdg-shell-server-protocol.h		\
 	git-version.h
 
 CLEANFILES = $(BUILT_SOURCES)