aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1d2ca6d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+CC = cc
+CFLAGS = -std=c99 -Wall -Wextra -Wpedantic -O2
+LDFLAGS = -lncurses -lpthread -lssl -lcrypto
+
+TARGET = sirc
+SRC = sirc.c
+MAN = sirc.1
+
+PREFIX ?= $(HOME)/.local
+BINDIR = $(DESTDIR)$(PREFIX)/bin
+MANDIR = $(DESTDIR)$(PREFIX)/share/man/man1
+
+.PHONY: all clean install uninstall
+
+all: $(TARGET)
+
+$(TARGET): $(SRC)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+install: $(TARGET)
+ install -Dm755 $(TARGET) $(BINDIR)/$(TARGET)
+ install -Dm644 $(MAN) $(MANDIR)/$(MAN)
+
+uninstall:
+ rm -f $(BINDIR)/$(TARGET)
+ rm -f $(MANDIR)/$(MAN)
+
+clean:
+ rm -f $(TARGET)