diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -6,6 +6,10 @@ CFLAGS = -Wall -O2 SRC_DIR = src BIN_DIR = bin +# Installation directory +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin + # Source and target names TARGET = chproc SRC = $(SRC_DIR)/$(TARGET).c @@ -57,6 +61,18 @@ define run_test fi endef +# Install +install: $(BIN) + @echo "Installing $(TARGET) to $(BINDIR)" + mkdir -p $(BINDIR) + cp -v $(BIN) $(BINDIR)/ + +# Uninstall +uninstall: + @echo "Removing $(TARGET) from $(BINDIR)" + rm -v -f $(BINDIR)/$(TARGET) + +# Test test: $(BIN) $(call run_test,$(TARGET),no args) $(call run_test,$(TARGET),$(ARG)) |