From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 12 Jun 2024 15:39:48 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sHOCa-004pog-2V for lore@lore.pengutronix.de; Wed, 12 Jun 2024 15:39:48 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sHOCR-00039A-3q; Wed, 12 Jun 2024 15:39:39 +0200 Received: from mail-db8eur05on2040.outbound.protection.outlook.com ([40.107.20.40] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sHOBE-00031C-2t; Wed, 12 Jun 2024 15:38:25 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEJ5K0V64titv+9kgzB6K0FFdXRbzLXxzSwWb+4shluVD9RtyMyd6c+lcVXLwMajSUx0mTEDnk7NZqJJoTqWwozu2farAi2Myrwi0HsnaXE2g2X0JZbxJPgANGGmXThLC5IrABreIu/LrtkV7jfLa3IPPoUEA99GDR7zZ/U6YvPoExJ25cO8LMXHpHg+lEAlBURo6X8BlvShRdraHCKeoNww0leWVcbUlzhmr4h7zao3cU+2y6WuabJ6AknUhz9O3CQDq0q8SNhMiN/GVhllklI89IwsjMpq5TSH1Fcztli6Y0fTwtYYTLT9QMrHJUHWqa9xARvlGfYkqv2YxRbFAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=s3U3RoajuC+hS6ADN0qDiEx12ybcEZbrx96YNsYdHn8=; b=oNaBnKJVvBkzuSjSeKVUS+2kW+695JJWDuNCZ9xYJ88kooePp+0Vy7poFITo6JhrIpb9x4sdxnQs6qS+IjABx7aHmIV7GHgdB7G9JBetkk01+E0lIOADKHbIiaIhUP9PHbp2FfOUCQ/KG92Kqn+tw+G871ITzd8inDOo2eLzYAfAyTjiiVKXc1OeUVqeLZmSvWkYsZU6YpKjzA4tD3WluM6IKERQX5hg9H82vU6lW8fQmYmYGGbvkr46m1ZB/wM/rPm+lO5IfiH8FgWfFdCNAp19psJBGyKhEY6m5iDrYTYxa1wr6BL0uKMixT8+aBKkGiFiuSUaQsz8yoBcAbrO5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 193.8.40.94) smtp.rcpttodomain=pengutronix.de smtp.mailfrom=leica-geosystems.com.cn; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=leica-geosystems.com.cn; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com.cn; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s3U3RoajuC+hS6ADN0qDiEx12ybcEZbrx96YNsYdHn8=; b=PhPTkKtzcYNXxbdwkkkkiGR2V+A8vfL2EGUK8aGLwAgxRPsUqpOGQ58h3pGveFUdSaML1JkPFDnJR7O7JaPYDy+IjXRj+zrrGrra366aGMGM5izULh8QVSp9srhw7JG2L1sosIPPwNGPOYV7kRhugUpluWwLEBDb6Z6DTCQ14IM= Received: from DU7PR01CA0024.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::26) by PAWPR06MB8883.eurprd06.prod.outlook.com (2603:10a6:102:382::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Wed, 12 Jun 2024 13:38:20 +0000 Received: from DB1PEPF0003922F.eurprd03.prod.outlook.com (2603:10a6:10:50f:cafe::b9) by DU7PR01CA0024.outlook.office365.com (2603:10a6:10:50f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.20 via Frontend Transport; Wed, 12 Jun 2024 13:38:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 193.8.40.94) smtp.mailfrom=leica-geosystems.com.cn; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=leica-geosystems.com.cn; Received-SPF: Pass (protection.outlook.com: domain of leica-geosystems.com.cn designates 193.8.40.94 as permitted sender) receiver=protection.outlook.com; client-ip=193.8.40.94; helo=hexagon.com; pr=C Received: from hexagon.com (193.8.40.94) by DB1PEPF0003922F.mail.protection.outlook.com (10.167.8.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Wed, 12 Jun 2024 13:38:20 +0000 Received: from aherlnxbspsrv01.lgs-net.com ([10.60.34.116]) by hexagon.com with Microsoft SMTPSVC(10.0.17763.1697); Wed, 12 Jun 2024 15:38:19 +0200 From: LI Qingwu To: Qing-wu.Li@leica-geosystems.com.cn, oss-tools@pengutronix.de, m.felsch@pengutronix.de Date: Wed, 12 Jun 2024 15:38:16 +0200 Message-Id: <20240612133818.3256224-1-Qing-wu.Li@leica-geosystems.com.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 12 Jun 2024 13:38:19.0682 (UTC) FILETIME=[C98FE820:01DABCCD] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF0003922F:EE_|PAWPR06MB8883:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 95fcfe56-c6e7-48ff-01cc-08dc8ae4ec66 X-SET-LOWER-SCL-SCANNER: YES X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230032|1800799016|36860700005|376006|82310400018; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?anpUu40jmai8xAwKiy+HHpJ1foZIdXQAYT8tq6k3Z840slmiQnv1CBqWf4iq?= =?us-ascii?Q?9P7MGSSSexC01sXpAyTVmH+5wsD12T3he/+ZR1JDua57aS4+G02SbShlZKnp?= =?us-ascii?Q?c4u04nbxO/uvAItTSXu1rm1k3T33TE408q4cWWit0BOqGcsDcRH1fEtBqLyh?= =?us-ascii?Q?0CULBnu0vE8JTOJUBzeUSr/18gllqLc1p8vGtSuM+2cSjoB5oZAo96Vqe+6v?= =?us-ascii?Q?AlgIAFORAj8fr+7iZmNmj0HwgDUsl7K8TyShwOqfGaL7foYDmDHmt0tOk58G?= =?us-ascii?Q?aDalVC5YIDe0bI5FEzu99Kc6KgJRFm4SYLpgBa+XfaegfuSV8fgGaqY2NWAm?= =?us-ascii?Q?5soTy1F6mM7/wNOkCTzGIOoo7bTxL8O44iq8VGEM9aPelMoN5nDD9GerZvUY?= =?us-ascii?Q?pvDPegqUxfTPyOOSF+NVoS4HYT2NwSn9KpSEFvDzW9CKbhbuiRcVGNn9QFVY?= =?us-ascii?Q?wf+hdM1us0fefAoLOCsPbCr5uNQ5BqKF0tkNFz3BR0EZIyIN65zUC1m4I0X9?= =?us-ascii?Q?z0F0B6sl0Ob5pcH7UuUwudyp2riz38W60ywovD8IeRViM27Yox1PRhNhf2/l?= =?us-ascii?Q?UlKSwB2jhtmTSXh4oZJFGFipcP2hTQYeSvx6sbHyTmUPO5oE8ldOxQTO+dKO?= =?us-ascii?Q?0QtaR9fuw4HHNKRzc9tkj81OPol5CzJEGmDK668gtIXCGAImslML5CoyBqfl?= =?us-ascii?Q?JtPsvY49FPFaClHADpzNl3H2yVvdmlEQJgX/mMsiCQkz8y+JKHZNXXQFugFP?= =?us-ascii?Q?lwaR4lJGqPjbLk2fZj44SfU9w/LO5m2istB6Ux+gW/dtZ1apESvjLtQOKSOx?= =?us-ascii?Q?7Xm5237fqRjRwizsu//bxMAle/MALUO9frJXOXarZYBSBhLkWqwUptkG/Kff?= =?us-ascii?Q?O8GecSA8vVtPDSwaXQ0h9P4zEPHUJkGV5R70ryguA7ogti0erxe0WaI0jmDf?= =?us-ascii?Q?d4Y1mrzoNKZ4FYgG/44k7fyIaZEsF4okYeFQRG/kfC/200xd5hWRTiOMwFes?= =?us-ascii?Q?9M/jGpIxwlvb1MdXeec0v8Y2IYnmNRSQ6ve+udxokD3mCYCcCKU+ETeZeCII?= =?us-ascii?Q?1L4qG92fI12hJw8rKBQVV6Bdr+L/DlMjx37KGhCK32L00IdcinaKwjyl4kf4?= =?us-ascii?Q?qiPZfrwhfPQivxDKUZvGcxekqmVEc69bgIA2u4eJ5rrbGgiLcyE5dEm6dc00?= =?us-ascii?Q?LXyX4LsIdhLaU157os1R2QtlrAwrOKVwm6yqqSdXaxbrkILpMIvRy4j/UmJ+?= =?us-ascii?Q?cDFZxLuEeoGGI+x4tWRK2mEGos+8C3SMZguoPpon5UwoQ8vaP8WlJGJbsym0?= =?us-ascii?Q?/B4oLO+1ekXe6BPs5QfpPfgxhsBb571r3DOJGllpYAd6Zp77NoI1J6MdVxAK?= =?us-ascii?Q?dMu4vA7CYIWWkpU4Z06sOF86MSIMM9e51DycBWsSWEFko0r6Og=3D=3D?= X-Forefront-Antispam-Report: CIP:193.8.40.94; CTRY:CH; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:hexagon.com; PTR:ahersrvdom50.leica-geosystems.com; CAT:NONE; SFS:(13230032)(1800799016)(36860700005)(376006)(82310400018); DIR:OUT; SFP:1101; X-OriginatorOrg: leica-geosystems.com.cn X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2024 13:38:20.1646 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95fcfe56-c6e7-48ff-01cc-08dc8ae4ec66 X-MS-Exchange-CrossTenant-Id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a; Ip=[193.8.40.94]; Helo=[hexagon.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF0003922F.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR06MB8883 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 X-Mailman-Approved-At: Wed, 12 Jun 2024 15:39:37 +0200 Subject: [OSS-Tools] [PATCH platsch V2 1/3] convert to meson build X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false convert to meson build, add set dir and base const to fix build warnings. Signed-off-by: LI Qingwu --- 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