aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 10 insertions, 5 deletions
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