hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 97a3646..fb7a0d8 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,9 @@ CFLAGS = -std=c17 -Wall -Wextra -Werror -Wpedantic -O2 -Ibin
SOURCES = ast.c ast.h eval.c eval.h lexer.h main.c
OBJECTS = bin/lexer.o bin/parser.o bin/ast.o bin/eval.o bin/main.o
SANITIZE = -g -O0 -fsanitize=address,undefined
+PREFIX ?= /usr/local
-.PHONY: all debug check format lint clean
+.PHONY: all debug check format lint install uninstall clean
all: sfinae
@@ -50,5 +51,12 @@ format:
lint:
clang-tidy ast.c eval.c main.c -- -std=c17 -Ibin
+install: sfinae
+ install -d $(DESTDIR)$(PREFIX)/bin
+ install -m 755 sfinae $(DESTDIR)$(PREFIX)/bin/sfinae
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/sfinae
+
clean:
rm -rf bin sfinae