diff options
-rw-r--r-- | Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -1,15 +1,27 @@ CC = gcc -CFLAGS = -Wall -Ofast +CFLAGS = -Wall -O2 LDFLAGS = -lpulse - TARGET = pavolctld -SOURCES = pavolctld.c +SRCS = pavolctld.c +PREFIX = /usr/local all: $(TARGET) -$(TARGET): $(SOURCES) - $(CC) $(CFLAGS) -o $(TARGET) $(SOURCES) $(LDFLAGS) +$(TARGET): $(SRCS) + $(CC) $(CFLAGS) -o $@ $(SRCS) $(LDFLAGS) clean: rm -f $(TARGET) +install: all + mkdir -p $(PREFIX)/bin + cp pavolctld $(PREFIX)/bin/pavolctld + chmod 755 $(PREFIX)/bin/pavolctld + mkdir -p $(PREFIX)/share/man/man1 + cp pavolctld.1 $(PREFIX)/share/man/man1/pavolctld.1 + chmod 644 $(PREFIX)/share/man/man1/pavolctld.1 + +uninstall: + rm -f $(PREFIX)/bin/pavolctld $(PREFIX)/share/man/man1/pavolctld.1 + +.PHONY: all clean |