From f6a2387845269d0757ac8f1691f1f90a0fd07edd Mon Sep 17 00:00:00 2001 From: Liam Waldron Date: Wed, 5 Apr 2023 13:13:27 -0400 Subject: [PATCH] add header file to avoid implicit declaration warning --- Makefile | 14 ++++---------- include/libecrypt.h | 6 ++++++ 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 include/libecrypt.h diff --git a/Makefile b/Makefile index 3f7f7b0..28df43b 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,9 @@ include config.mk -static: src/libecrypt.c +all: src/libecrypt.c $(CC) -c src/libecrypt.c -o src/libecrypt.o ar -rc src/libecrypt.a src/libecrypt.o -shared: src/libecrypt.c - $(CC) -c -fpic src/libecrypt.c - $(CC) -shared src/libecrypt.o libecrypt.so - -install-static: src/libecrypt.a - install --mode=0755 src/libecrypt.a $(PREFIX)/lib - -install-shared: src/libecrypt.so - install --mode=0755 src/libecrypt.so $(PREFIX)/lib +install: src/libecrypt.a include/libecrypt.h + install src/libecrypt.a $(PREFIX)/lib + install include/libecrypt.h $(PREFIX)/include diff --git a/include/libecrypt.h b/include/libecrypt.h new file mode 100644 index 0000000..33585ae --- /dev/null +++ b/include/libecrypt.h @@ -0,0 +1,6 @@ +#ifndef LIBECRYPT_H_ +#define LIBECRYPT_H_ + +int ecrypt(PASSWD_LENGTH); + +#endif