From b4c67148a2d780bcbd59a97fb967b8625913e3e4 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 11 Apr 2023 11:25:15 +0200 Subject: Use size_t for lengths and complete Makefile. * lpass.c: Use size_t for all lengths * Makefile: Proper targets (clean, install, uninstall) added and more strict compilation flags * LICENSE: Actually add file... --- Makefile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b6fd30e..6a4177a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,20 @@ -CC = gcc -CFLAGS = -O2 -Wall +CC=gcc +CFLAGS?=-O2 -Wall -Wextra -Werror +PREFIX?=/usr/local + +all: lpass lpass: lpass.c - $(CC) $(CFLAGS) -lcrypto -o lpass lpass.c + $(CC) -std=c99 -pedantic $(CFLAGS) -lcrypto -o lpass lpass.c + +clean: + rm -rf lpass + +install: all + mkdir -p $(PREFIX)/bin + install -m755 lpass $(PREFIX)/bin/lpass + +uninstall: + rm -rf $(PREFIX)/bin/lpass + +.PHONY: all clean install uninstall -- cgit v1.2.3