From 9840bc4af2c4c24041dc36758847fdff33d0d9c7 Mon Sep 17 00:00:00 2001 From: Marcel Alexandru Nitan Date: Wed, 1 Feb 2023 02:49:26 +0200 Subject: [PATCH] make: add install --- Makefile | 6 +++++- README.md | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a14e0d2..762f72e 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CFLAGS = -I./src/include SRCS = src/util.cpp src/configfsisomanager.cpp src/main.cpp OBJS = $(SRCS:.cpp=.o) TARGET = isodrive +INSTALL_DIR = /usr/local/bin all: $(TARGET) @@ -12,8 +13,11 @@ $(TARGET): $(OBJS) %.o: %.cpp $(CC) $(CFLAGS) -c $< -o $@ +install: $(TARGET) + install $(TARGET) $(INSTALL_DIR) + clean: rm -f $(TARGET) $(OBJS) -.PHONY: all clean +.PHONY: all install clean diff --git a/README.md b/README.md index 3487963..c155d37 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,15 @@ * `make` +* `sudo make install` (optional) + mount -* `sudo ./isodrive /full/path/to/file.iso` +* `sudo isodrive /full/path/to/file.iso` umount -* `sudo ./isodrive` +* `sudo isodrive` Inspired by https://github.com/fredldotme/ISODriveUT