commit f7d71723b07bc1cd12a081c9a21fff0b4168d46a
parent 44e906556235880f8a2e4183c5ddcdbd4476fe85
Author: Sweets <Sweets@users.noreply.github.com>
Date: Wed, 1 Jul 2020 17:04:24 -0700
Merge pull request #6 from bit9tream/master
add 'install' taget to Makefile
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -2,6 +2,8 @@
TARGET = tiramisu
SRC := tiramisu.c callbacks.c format.c
+PREFIX ?= /usr/local
+
CFLAGS = -Wall
IFLAGS = $(shell pkg-config --cflags glib-2.0 gio-2.0)
LFLAGS = $(shell pkg-config --libs glib-2.0 gio-2.0)
@@ -11,5 +13,9 @@ all: $(TARGET)
$(TARGET): $(OBJ)
$(CC) $(CFLAGS) $(IFLAGS) $(SRC) $(LFLAGS) -o $(TARGET)
+install: $(TARGET)
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ install $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
+
clean:
$(RM) ./tiramisu