summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-10-24 00:53:00 -0700
committerMichael Forney <mforney@mforney.org>2016-10-30 13:44:58 -0700
commit8b5c442f3b6a80a3bf464fdf1a05ad07c75f5d32 (patch)
tree20a1106c3c4d8f722121e2675021817610f2a62f
parent67c84eaf3709d4b2245d7829804ff780f531c55b (diff)
Add swc scm
-rw-r--r--.gitmodules3
-rw-r--r--desktop/gen.rc1
-rw-r--r--desktop/swc/.gitignore1
-rw-r--r--desktop/swc/gen.rc93
-rw-r--r--desktop/swc/rev1
m---------desktop/swc/src0
6 files changed, 99 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index 32dcbf44..3cfd3f3d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -96,6 +96,9 @@
[submodule "desktop/plan9fonts/src"]
path = desktop/plan9fonts/src
url = https://github.com/rtrn/plan9fonts
+[submodule "desktop/swc/src"]
+ path = desktop/swc/src
+ url = https://github.com/michaelforney/swc
[submodule "desktop/wayland/src"]
path = desktop/wayland/src
url = https://anongit.freedesktop.org/git/wayland/wayland.git
diff --git a/desktop/gen.rc b/desktop/gen.rc
index d7774421..cb48b831 100644
--- a/desktop/gen.rc
+++ b/desktop/gen.rc
@@ -8,6 +8,7 @@ subgen libpciaccess
subgen libxkbcommon
subgen pixman
subgen plan9fonts
+subgen swc
subgen terminus-font
subgen wayland
subgen wayland-protocols
diff --git a/desktop/swc/.gitignore b/desktop/swc/.gitignore
new file mode 100644
index 00000000..012dc66e
--- /dev/null
+++ b/desktop/swc/.gitignore
@@ -0,0 +1 @@
+/tools.ninja
diff --git a/desktop/swc/gen.rc b/desktop/swc/gen.rc
new file mode 100644
index 00000000..bb8c0491
--- /dev/null
+++ b/desktop/swc/gen.rc
@@ -0,0 +1,93 @@
+cflags\
+ -D _GNU_SOURCE\
+ -D 'screen_new=swc__screen_new' \
+ -D 'remove_resource=swc__remove_resource' \
+ -isystem desktop/fontconfig/src\
+ -isystem desktop/libdrm/src/include/drm\
+ -isystem desktop/libdrm/src\
+ -isystem desktop/libevdev/src\
+ -isystem desktop/libxkbcommon/src\
+ -isystem '$builddir'/desktop/pixman/include\
+ -isystem '$builddir'/desktop/wayland-protocols/include\
+ -isystem '$builddir'/desktop/wayland/include\
+ -isystem '$builddir'/desktop/wld/include\
+ -I '$outdir' \
+ -I '$outdir'/include\
+ -I '$srcdir'
+
+cc launch/protocol.c
+
+waylandproto protocol/swc.xml\
+ include/swc-^(client server)^-protocol.h swc-protocol.c
+
+build '$outdir'/include/swc.h copy '$srcdir'/libswc/swc.h
+phony headers include/^(swc.h swc-^(client server)^-protocol.h)
+
+build '$outdir'/wayland-drm-server-protocol.h copy '$builddir'/desktop/wld/protocol/wayland-drm-server-protocol.h
+
+{
+ include 'toolchain/$host_toolchain.ninja'
+ exe convert_font cursor/convert_font.c
+} >tools.ninja
+subninja '$dir'/tools.ninja
+
+rule convert_font '$outdir/convert_font $in $out.tmp 2>/dev/null && mv $out.tmp $out'
+build '$outdir'/cursor/cursor_data.h convert_font '$srcdir'/cursor/cursor.pcf '|' '$outdir'/convert_font
+
+phony deps\
+ phony/desktop/^(pixman wayland wayland-protocols wld)^/headers\
+ wayland-drm-server-protocol.h\
+ include/swc-server-protocol.h\
+ cursor/cursor_data.h
+
+lib libswc.a -d 'phony/$dir/deps' \
+ libswc/^(\
+ bindings.c\
+ compositor.c\
+ cursor_plane.c\
+ data.c\
+ data_device.c\
+ data_device_manager.c\
+ drm.c\
+ evdev_device.c\
+ input.c\
+ keyboard.c\
+ launch.c\
+ mode.c\
+ output.c\
+ panel.c\
+ panel_manager.c\
+ pointer.c\
+ primary_plane.c\
+ region.c\
+ screen.c\
+ seat.c\
+ shell.c\
+ shell_surface.c\
+ shm.c\
+ subcompositor.c\
+ subsurface.c\
+ surface.c\
+ swc.c\
+ util.c\
+ view.c\
+ wayland_buffer.c\
+ window.c\
+ xdg_popup.c\
+ xdg_shell.c\
+ xdg_surface.c\
+ )\
+ launch/protocol.c.o\
+ swc-protocol.c.o\
+ '$builddir'/^(\
+ desktop/libevdev/libevdev.a\
+ desktop/libxkbcommon/libxkbcommon.a\
+ desktop/wayland-protocols/xdg-shell-unstable-v5-protocol.c.o\
+ desktop/wayland/libwayland-server.a.d\
+ desktop/wld/libwld.a.d\
+ )
+
+exe swc-launch launch/^(launch.c protocol.c.o) '$builddir'/desktop/libdrm/libdrm.a
+file bin/swc-launch '$outdir'/swc-launch 4755
+
+fetch git
diff --git a/desktop/swc/rev b/desktop/swc/rev
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/desktop/swc/rev
@@ -0,0 +1 @@
+1
diff --git a/desktop/swc/src b/desktop/swc/src
new file mode 160000
+Subproject ee0825dd7b49a5ac65d5e94bdad159ca77481bc