Source directory hierarchy
authorTaekyun Kim <tkq.kim@samsung.com>
Fri, 27 Feb 2015 04:44:37 +0000 (13:44 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Fri, 19 Jun 2015 09:06:39 +0000 (18:06 +0900)
Change-Id: I7572a5bebc51740777d5624bae2e26cd9d78e62e

configure.ac
src/Makefile.am
src/compositor.c [new file with mode: 0644]
src/pepper.c [deleted file]
src/pepper.h [new file with mode: 0644]
src/server/server.c [new file with mode: 0644]

index 42ead8c..ce33555 100644 (file)
@@ -20,12 +20,13 @@ AC_PROG_CC
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
-# Compositor build requirements
-COMPOSITOR_MODULES="wayland-server >= 1.6.00 pixman-1 >= 0.25.2"
+# Pepper build requirements
+PEPPER_MODULES="wayland-server >= 1.6.00 pixman-1 >= 0.25.2"
 
-# Check compositor modules
-PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
+# Check pepper modules
+PKG_CHECK_MODULES(PEPPER, [$PEPPER_MODULES])
 
+# Check pepper server modules
 # Output files
 AC_CONFIG_FILES([
 Makefile
index 144e31e..4f81c1d 100644 (file)
@@ -1,9 +1,16 @@
 bin_PROGRAMS =
+lib_LTLIBRARIES =
+
+# pepper library
+lib_LTLIBRARIES += libpepper.la
+libpepper_la_CFLAGS = $(PEPPER_CFLAGS)
+libpepper_la_LIBADD = $(PEPPER_LIBS)
+libpepper_la_SOURCES = pepper.h                        \
+                      compositor.c
 
 # Pepper server executable
 bin_PROGRAMS += pepper
 
 pepper_LDFLAGS = -export-dynamic
-pepper_CFLAGS = $(COMPOSITOR_CFLAGS)
-pepper_LDADD = $(COMPOSITOR_LIBS)
-pepper_SOURCES = pepper.c
+pepper_LDADD = libpepper.la
+pepper_SOURCES = server/server.c
diff --git a/src/compositor.c b/src/compositor.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/pepper.c b/src/pepper.c
deleted file mode 100644 (file)
index a4775c4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <wayland-server.h>
-
-int
-main(int argc, char **argv)
-{
-    int                        ret = EXIT_SUCCESS;
-    struct wl_display *        display = NULL;
-    const char *               socket_name = NULL;
-
-    /* Create a display object. */
-    display = wl_display_create();
-
-    if (!display)
-    {
-       printf("Failed to create display.\n");
-       ret = EXIT_FAILURE;
-       goto out;
-    }
-
-    /* Add a listening socket. */
-    socket_name = wl_display_add_socket_auto(display);
-
-    if (!socket_name)
-    {
-       printf("Failed to add socket.\n");
-       ret = EXIT_FAILURE;
-       goto out;
-    }
-
-    printf("Pepper server socket added: %s\n", socket_name);
-
-    /* Start main loop. */
-    wl_display_run(display);
-
-out:
-    if (display)
-       wl_display_destroy(display);
-
-    return ret;
-}
diff --git a/src/pepper.h b/src/pepper.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/server/server.c b/src/server/server.c
new file mode 100644 (file)
index 0000000..00aff83
--- /dev/null
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main(int argc, char **argv)
+{
+       return 0;
+}