]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Put code in src/ and include/
authorJohan Malm <jgm323@gmail.com>
Wed, 27 May 2020 13:29:05 +0000 (14:29 +0100)
committerJohan Malm <jgm323@gmail.com>
Wed, 27 May 2020 13:29:05 +0000 (14:29 +0100)
12 files changed:
include/labwc.h [moved from labwc.h with 100% similarity]
meson.build
src/debug/dbg.c [moved from dbg.c with 100% similarity]
src/debug/meson.build [new file with mode: 0644]
src/deco.c [moved from deco.c with 100% similarity]
src/main.c [moved from main.c with 100% similarity]
src/meson.build [new file with mode: 0644]
src/output.c [moved from output.c with 100% similarity]
src/server.c [moved from server.c with 100% similarity]
src/view.c [moved from view.c with 100% similarity]
src/xdg.c [moved from xdg.c with 100% similarity]
src/xwl.c [moved from xwl.c with 100% similarity]

similarity index 100%
rename from labwc.h
rename to include/labwc.h
index a8ec163d7bcc1885f713b6e35167d827d9903e11..01d0d94142c19f70a87a00ff3656fa046cb66363 100644 (file)
@@ -18,64 +18,40 @@ add_project_arguments(
 
 cc = meson.get_compiler('c')
 
-add_project_arguments(cc.get_supported_arguments([
-       '-Wundef',
-       '-Wlogical-op',
-       '-Wmissing-include-dirs',
-       '-Wold-style-definition',
-       '-Wpointer-arith',
-       '-Winit-self',
-       '-Wstrict-prototypes',
-       '-Wimplicit-fallthrough=2',
-       '-Wendif-labels',
-       '-Wstrict-aliasing=2',
-       '-Woverflow',
-       '-Wmissing-prototypes',
-       '-Wno-missing-braces',
-       '-Wno-missing-field-initializers',
-       '-Wno-unused-parameter',
-]), language: 'c')
+add_project_arguments(cc.get_supported_arguments(
+  [
+    '-Wno-unused-parameter',
+    '-Wundef',
+  ]),
+  language: 'c',
+)
 
 wlroots_proj = subproject(
-       'wlroots',
-       default_options: ['examples=false'],
-       required: false,
+  'wlroots',
+  default_options: ['examples=false'],
+  required: false,
 )
+
 if wlroots_proj.found()
-       wlroots = wlroots_proj.get_variable('wlroots')
+  wlroots       = wlroots_proj.get_variable('wlroots')
 else
-       wlroots = dependency('wlroots', version: '>= 0.10.0')
+  wlroots       = dependency('wlroots', version: '>= 0.10.0')
 endif
+wayland_server  = dependency('wayland-server')
+wayland_protos  = dependency('wayland-protocols')
+xkbcommon       = dependency('xkbcommon')
 
-wayland_protos = dependency('wayland-protocols')
-wayland_server = dependency('wayland-server')
-xkbcommon      = dependency('xkbcommon')
+labwc_inc       = include_directories('include')
 
 subdir('protocols')
+subdir('src')
 
-labwc_sources = [
-  'main.c',
-  'server.c',
-  'output.c',
-  'view.c',
-  'xdg.c',
-  'xwl.c',
-  'deco.c',
-  'dbg.c',
-]
-
-labwc_headers = [
-  'labwc.h',
-]
+labwc_deps      = [ server_protos, wayland_server, wlroots, xkbcommon, ]
 
 executable(
   meson.project_name(),
-  labwc_sources + labwc_headers,
-  dependencies: [
-    server_protos,
-    wayland_server,
-    wlroots,
-    xkbcommon,
-  ],
+  labwc_sources,
+  include_directories: [labwc_inc],
+  dependencies: labwc_deps,
   install: true,
 )
similarity index 100%
rename from dbg.c
rename to src/debug/dbg.c
diff --git a/src/debug/meson.build b/src/debug/meson.build
new file mode 100644 (file)
index 0000000..ef59ebe
--- /dev/null
@@ -0,0 +1,3 @@
+labwc_sources += files(
+  'dbg.c',
+)
similarity index 100%
rename from deco.c
rename to src/deco.c
similarity index 100%
rename from main.c
rename to src/main.c
diff --git a/src/meson.build b/src/meson.build
new file mode 100644 (file)
index 0000000..36fc8a2
--- /dev/null
@@ -0,0 +1,11 @@
+labwc_sources = files(
+  'main.c',
+  'server.c',
+  'output.c',
+  'view.c',
+  'xdg.c',
+  'xwl.c',
+  'deco.c',
+)
+
+subdir('debug')
similarity index 100%
rename from output.c
rename to src/output.c
similarity index 100%
rename from server.c
rename to src/server.c
similarity index 100%
rename from view.c
rename to src/view.c
diff --git a/xdg.c b/src/xdg.c
similarity index 100%
rename from xdg.c
rename to src/xdg.c
diff --git a/xwl.c b/src/xwl.c
similarity index 100%
rename from xwl.c
rename to src/xwl.c