aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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