From 7fb6beed01bc1a59438b8b2a9b34b2dba296e553 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 1 Sep 2024 08:00:00 +0000 Subject: meson: build Linux-PAM using meson On my non-representative hardware, the full build using autotools (./autogen.sh && CFLAGS=-O2 ./configure && make -j`nproc` && make -j`nproc` install) takes about 45 seconds. On the same hardware, the full build using meson (meson setup -Doptimization=2 dir && meson compile -C dir && meson install -C dir) takes just about 7.5 seconds. --- conf/pam_conv1/meson.build | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 conf/pam_conv1/meson.build (limited to 'conf') diff --git a/conf/pam_conv1/meson.build b/conf/pam_conv1/meson.build new file mode 100644 index 00000000..487acd6a --- /dev/null +++ b/conf/pam_conv1/meson.build @@ -0,0 +1,25 @@ +pam_conv_y = custom_target( + 'pam_conv_y.[ch]', + input: 'pam_conv_y.y', + output: ['pam_conv_y.c', 'pam_conv_y.h'], + command: yacc_cmd, +) + +pam_conv_l = custom_target( + 'pam_conv_l.c', + input: 'pam_conv_l.l', + output: 'pam_conv_l.c', + depends: pam_conv_y, + command: [prog_flex, '-o', '@OUTPUT@', '@INPUT@'], +) + +executable( + 'pam_conv1', + sources: [pam_conv_l, pam_conv_y], + include_directories: [libpam_inc], + c_args: [ + '-Wno-unused-function', + '-Wno-sign-compare', + ], + link_args: exe_link_args, +) -- cgit v1.2.3