diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | flake.nix | 2 | ||||
-rw-r--r-- | include/gpg.h (renamed from gpg.h) | 0 | ||||
-rw-r--r-- | include/libnpass.h (renamed from pass_util.h) | 0 | ||||
-rw-r--r-- | include/util.h (renamed from util.h) | 0 | ||||
-rw-r--r-- | libnpass/gpg.c (renamed from gpg.c) | 0 | ||||
-rw-r--r-- | libnpass/libnpass.c (renamed from pass_util.c) | 2 | ||||
-rw-r--r-- | libnpass/meson.build | 11 | ||||
-rw-r--r-- | libnpass/util.c (renamed from util.c) | 0 | ||||
-rw-r--r-- | meson.build | 16 | ||||
-rw-r--r-- | npass/meson.build | 8 | ||||
-rw-r--r-- | npass/npass.c (renamed from pass.c) | 2 |
13 files changed, 38 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5fe4433..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.o -pass diff --git a/Makefile b/Makefile deleted file mode 100644 index c636e6d..0000000 --- a/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -OBJECTS = pass.o pass_util.o util.o gpg.o -CC = gcc -CFLAGS = -g -Wvla -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpedantic -fsanitize=address - -pass: $(OBJECTS) - $(CC) $(CFLAGS) -o pass $(OBJECTS) -l gpgme - -pass.o: pass_util.h util.h -pass_util.o: util.h gpg.h - -.PHONY: clean -clean: - rm -f pass $(OBJECTS) @@ -17,7 +17,7 @@ default = pkgs.mkShell { name = "dev"; - buildInputs = with pkgs; [ gpgme ]; + buildInputs = with pkgs; [ gpgme meson ninja ]; shellHook = '' [ -z "$XDG_DATA_HOME" ] && export XDG_DATA_HOME="$HOME/.local/share" diff --git a/pass_util.h b/include/libnpass.h index d4b7fb4..d4b7fb4 100644 --- a/pass_util.h +++ b/include/libnpass.h diff --git a/pass_util.c b/libnpass/libnpass.c index de8308a..72e51df 100644 --- a/pass_util.c +++ b/libnpass/libnpass.c @@ -8,7 +8,7 @@ #include <termios.h> #include <stdio.h> -#include "pass_util.h" +#include "libnpass.h" #include "util.h" #include "gpg.h" diff --git a/libnpass/meson.build b/libnpass/meson.build new file mode 100644 index 0000000..1ce4621 --- /dev/null +++ b/libnpass/meson.build @@ -0,0 +1,11 @@ +lib_npass = static_library( + 'libnpass', + [ + 'util.c', + 'gpg.c', + 'libnpass.c' + ], + + dependencies: gpgme_dep, + include_directories: npass_inc, +) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..a0c5988 --- /dev/null +++ b/meson.build @@ -0,0 +1,16 @@ +project( + 'npass', + 'c', + version : '0.1', + license: 'GPL-3.0-only', + default_options : [ + 'warning_level=3', + ] +) + +gpgme_dep = dependency('gpgme', version: '>= 1.0') + +npass_inc = include_directories('include') + +subdir('libnpass') +subdir('npass') diff --git a/npass/meson.build b/npass/meson.build new file mode 100644 index 0000000..2371298 --- /dev/null +++ b/npass/meson.build @@ -0,0 +1,8 @@ +executable( + 'pass', + 'npass.c', + + include_directories: npass_inc, + link_with: lib_npass, + install: true, +) @@ -4,7 +4,7 @@ #include <stdlib.h> #include <errno.h> -#include "pass_util.h" +#include "libnpass.h" #include "util.h" void print_usage(void); |