diff options
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 |