make: add install

This commit is contained in:
Marcel Alexandru Nitan
2023-02-01 02:49:26 +02:00
parent d5aefcd9bd
commit 9840bc4af2
2 changed files with 9 additions and 3 deletions

View File

@@ -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

View File

@@ -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