add header file to avoid implicit declaration warning

This commit is contained in:
Liam Waldron 2023-04-05 13:13:27 -04:00
parent dc9899ae55
commit f6a2387845
2 changed files with 10 additions and 10 deletions

View File

@ -1,15 +1,9 @@
include config.mk include config.mk
static: src/libecrypt.c all: src/libecrypt.c
$(CC) -c src/libecrypt.c -o src/libecrypt.o $(CC) -c src/libecrypt.c -o src/libecrypt.o
ar -rc src/libecrypt.a src/libecrypt.o ar -rc src/libecrypt.a src/libecrypt.o
shared: src/libecrypt.c install: src/libecrypt.a include/libecrypt.h
$(CC) -c -fpic src/libecrypt.c install src/libecrypt.a $(PREFIX)/lib
$(CC) -shared src/libecrypt.o libecrypt.so install include/libecrypt.h $(PREFIX)/include
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

6
include/libecrypt.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef LIBECRYPT_H_
#define LIBECRYPT_H_
int ecrypt(PASSWD_LENGTH);
#endif