aboutsummaryrefslogtreecommitdiffgithub
diff options
context:
space:
mode:
authorAustin Adams <git@austinjadams.com>2017-10-01 00:15:31 -0400
committerAustin Adams <git@austinjadams.com>2017-10-01 00:15:31 -0400
commit1b1d855e92cc25aaaf2cf4d878e61b0b8837a689 (patch)
tree857b8128db455110631993490699fde0cfbbdc96
parent86de54264061ae45b47f2e1c1e033b6e8d0d621a (diff)
downloadgustave-1b1d855e92cc25aaaf2cf4d878e61b0b8837a689.tar.gz
gustave-1b1d855e92cc25aaaf2cf4d878e61b0b8837a689.tar.xz
Makefile: Add install rule
Allow running `sudo make install' for convenience.
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1747432..b828197 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ DEPS=$(wildcard *.h)
SOURCE=$(wildcard *.c)
OBJ=$(patsubst %.c,%.o,$(SOURCE))
-.PHONY: clean
+.PHONY: install clean
$(BINARY): $(OBJ)
$(CC) -o $@ $(CFLAGS) $^ $(LIBS)
@@ -14,5 +14,8 @@ $(BINARY): $(OBJ)
%.o: %.c $(DEPS)
$(CC) -c $(CFLAGS) $<
+install:
+ install -Dm755 $(BINARY) /usr/local/bin/
+
clean:
rm -f $(OBJ) $(BINARY)