From 40c551385f20cc95a1b6571c4b1946cbed226f85 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Mon, 9 Sep 2024 21:08:07 -0500 Subject: update makefile to build & install, include manpage, make notification persistent and change urgency --- Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 180a311..8b6efbb 100644 --- a/Makefile +++ b/Makefile @@ -7,20 +7,25 @@ TARGET = lowbat SRCS = lowbat.c OBJS = $(SRCS:.c=.o) -# Default target all: $(TARGET) -# Build target $(TARGET): $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) -# Compile source files %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ -# Clean up build files clean: rm -f $(TARGET) $(OBJS) -# Phony targets +install: all + mkdir -p /usr/local/bin + cp lowbat /usr/local/bin/lowbat + chmod 755 /usr/local/bin/lowbat + cp lowbat.1 /usr/local/share/man/man1/lowbat.1 + chmod 644 /usr/local/share/man/man1/lowbat.1 + +uninstall: + rm -f /usr/local/bin/lowbat /usr/local/share/man/man1/lowbat.1 + .PHONY: all clean -- cgit v1.2.3