diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2024-09-09 21:08:07 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2024-09-09 21:08:07 -0500 |
commit | 40c551385f20cc95a1b6571c4b1946cbed226f85 (patch) | |
tree | bd561084f82a817346bab048a403dd6304a925cf /Makefile | |
parent | 8e929bd44420ed9a3bc0b6a030cebbdfcafebf4d (diff) | |
download | lowbat-40c551385f20cc95a1b6571c4b1946cbed226f85.tar.xz lowbat-40c551385f20cc95a1b6571c4b1946cbed226f85.zip |
update makefile to build & install, include manpage, make notification persistent and change urgency
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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 |