aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2023-04-11 11:25:15 +0200
committerSamuel Fadel <samuel@nihil.ws>2023-04-11 11:25:15 +0200
commitb4c67148a2d780bcbd59a97fb967b8625913e3e4 (patch)
tree13a469395d1600a1e3cce72cd3a18ad8fd446f2b /Makefile
parent33936a05ac14136491fd461e1c6beea0e5269161 (diff)
Use size_t for lengths and complete Makefile.0.9
* lpass.c: Use size_t for all lengths * Makefile: Proper targets (clean, install, uninstall) added and more strict compilation flags * LICENSE: Actually add file...
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 18 insertions, 3 deletions
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