summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-10-23 23:56:38 -0700
committerMichael Forney <mforney@mforney.org>2016-10-30 13:44:58 -0700
commit18fb7fc5d579ff9fde0250e69504ef4818c61605 (patch)
treed2dd0c09d7b3a22b7cb4a32287db4a127c8c9a2c
parent232d3f227c6eef2e2003a1e25786d20ed186e25f (diff)
Add wld scm
-rw-r--r--.gitmodules3
-rw-r--r--desktop/gen.rc1
-rw-r--r--desktop/wld/gen.rc65
-rw-r--r--desktop/wld/rev1
m---------desktop/wld/src0
5 files changed, 70 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index d4f8ebff..7d2c4d31 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -100,6 +100,9 @@
path = desktop/wayland/src
url = https://anongit.freedesktop.org/git/wayland/wayland.git
ignore = all
+[submodule "desktop/wld/src"]
+ path = desktop/wld/src
+ url = https://github.com/michaelforney/wld
[submodule "devel/make/src"]
path = devel/make/src
url = git://git.sv.gnu.org/make.git
diff --git a/desktop/gen.rc b/desktop/gen.rc
index e10c250d..3b257f71 100644
--- a/desktop/gen.rc
+++ b/desktop/gen.rc
@@ -10,3 +10,4 @@ subgen pixman
subgen plan9fonts
subgen terminus-font
subgen wayland
+subgen wld
diff --git a/desktop/wld/gen.rc b/desktop/wld/gen.rc
new file mode 100644
index 00000000..25014b32
--- /dev/null
+++ b/desktop/wld/gen.rc
@@ -0,0 +1,65 @@
+cflags=(\
+ -D WITH_WAYLAND_SHM\
+ -D WITH_WAYLAND_DRM\
+ -isystem desktop/fontconfig/src\
+ -isystem desktop/freetype/src/include\
+ -isystem desktop/libdrm/src\
+ -isystem desktop/libdrm/src/include/drm\
+ -isystem '$builddir'/desktop/pixman/include\
+ -isystem '$builddir'/desktop/wayland/include\
+ -I '$outdir' \
+)
+
+hdrs=(drm.h pixman.h wayland.h wld.h)
+for(hdr in $hdrs) {
+ build '$outdir'/include/wld/$hdr copy '$srcdir'/$hdr
+ file include/wld/$hdr '$srcdir'/$hdr 644
+}
+phony headers include/wld/$hdrs
+
+srcs=(\
+ buffer.c\
+ buffered_surface.c\
+ color.c\
+ context.c\
+ drm.c\
+ dumb.c\
+ font.c\
+ renderer.c\
+ surface.c\
+ pixman.c\
+ wayland.c\
+ wayland-shm.c\
+ wayland-drm.c\
+ wayland-drm-protocol.c.o\
+)
+libs=(\
+ desktop/fontconfig/libfontconfig.a.d\
+ desktop/freetype/libfreetype.a.d\
+ desktop/libdrm/libdrm.a\
+ desktop/pixman/libpixman.a\
+ desktop/wayland/libwayland-client.a.d\
+)
+
+if(~ intel $config_video_drivers) {
+ cflags=($cflags -D WITH_DRM_INTEL -I desktop/libdrm/src/intel)
+ srcs=($srcs intel.c intel/batch.c)
+ libs=($libs desktop/libdrm/libdrm_intel.a.d)
+}
+if(~ nouveau $config_video_drivers) {
+ cflags=($cflags -D WITH_DRM_NOUVEAU -I desktop/libdrm/src/nouveau)
+ srcs=($srcs nouveau.c)
+ libs=($libs desktop/libdrm/libdrm_nouveau.a)
+}
+
+cflags $cflags
+
+waylandproto protocol/wayland-drm.xml\
+ protocol/wayland-drm-^(client server)^-protocol.h\
+ wayland-drm-protocol.c
+
+phony deps phony/desktop/^(pixman wayland)^/headers protocol/wayland-drm-client-protocol.h
+
+lib libwld.a -d 'phony/$dir/deps' $srcs '$builddir'/$libs
+
+fetch git
diff --git a/desktop/wld/rev b/desktop/wld/rev
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/desktop/wld/rev
@@ -0,0 +1 @@
+1
diff --git a/desktop/wld/src b/desktop/wld/src
new file mode 160000
+Subproject efe0a1ed1856a2e4a1893ed0f2d7dde43b5627f