mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
* [OSS-Tools] [PATCH platsch V2 1/3] convert to meson build
@ 2024-06-12 13:38 LI Qingwu
  2024-06-12 13:38 ` [OSS-Tools] [PATCH platsch V2 2/3] platsch: split into platsch and libplatsch LI Qingwu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: LI Qingwu @ 2024-06-12 13:38 UTC (permalink / raw)
  To: Qing-wu.Li, oss-tools, m.felsch

convert to meson build, add set dir and base const to fix build
warnings.

Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
---
 Makefile.am  | 23 -----------------------
 README.rst   | 10 ++++++++++
 configure.ac | 13 -------------
 meson.build  | 15 +++++++++++++++
 platsch.c    |  2 +-
 5 files changed, 26 insertions(+), 37 deletions(-)
 delete mode 100644 Makefile.am
 delete mode 100644 configure.ac
 create mode 100644 meson.build

diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index d149ae0..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-EXTRA_DIST = README.rst LICENSE
-
-sbin_PROGRAMS = platsch
-
-platsch_SOURCES = platsch.c
-platsch_CFLAGS = $(LIBDRM_CFLAGS)
-platsch_LDADD = $(LIBDRM_LIBS)
-
-CLEANFILES = \
-        $(DIST_ARCHIVES)
-
-DISTCLEAN = \
-        config.log \
-        config.status \
-        Makefile
-
-MAINTAINERCLEANFILES = \
-	aclocal.m4 \
-	configure \
-	depcomp \
-	install-sh \
-	Makefile.in \
-	missing
diff --git a/README.rst b/README.rst
index e318120..d20eb52 100644
--- a/README.rst
+++ b/README.rst
@@ -141,3 +141,13 @@ By adding a Signed-off-by line (e.g. using ``git commit -s``) saying::
 
 (using your real name and e-mail address), you state that your contributions
 are in line with the DCO.
+
+Cross compiling instructions
+----------------------------
+
+To cross compile the project, use the following commands:
+
+.. code-block:: shell
+
+    meson setup build
+    meson compile -C build
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 18878db..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,13 +0,0 @@
-AC_PREREQ([2.69])
-AC_INIT([platsch], [2019.12.0], [oss-tools@pengutronix.de])
-AC_CONFIG_SRCDIR([platsch.c])
-AM_INIT_AUTOMAKE([foreign dist-xz])
-
-AC_PROG_CC
-AC_PROG_MAKE_SET
-
-PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.4.112])
-
-AC_CONFIG_FILES([Makefile])
-
-AC_OUTPUT
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..6815bf3
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,15 @@
+project('platsch', 'c')
+
+platsch_dep = [dependency('libdrm', required: true)]
+sources = ['platsch.c']
+
+# Define the headers
+headers = ['platsch.h']
+
+# Create the platsch executable
+executable('platsch',
+    sources,
+    dependencies: platsch_dep,
+    install: true,
+    include_directories: include_directories('.')
+)
diff --git a/platsch.c b/platsch.c
index 535b589..1aaa8d5 100644
--- a/platsch.c
+++ b/platsch.c
@@ -111,7 +111,7 @@ struct modeset_dev {
 	uint32_t crtc_id;
 };
 
-void draw_buffer(struct modeset_dev *dev, char *dir, char *base)
+void draw_buffer(struct modeset_dev *dev, const char *dir, const char *base)
 {
 	int fd_src;
 	char filename[128];
-- 
2.34.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-12 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-12 13:38 [OSS-Tools] [PATCH platsch V2 1/3] convert to meson build LI Qingwu
2024-06-12 13:38 ` [OSS-Tools] [PATCH platsch V2 2/3] platsch: split into platsch and libplatsch LI Qingwu
2024-06-12 13:38 ` [OSS-Tools] [PATCH platsch V2 3/3] Add spinner executable for boot animation and text show LI Qingwu
2024-06-12 14:10 ` [OSS-Tools] [PATCH platsch V2 1/3] convert to meson build Marco Felsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox