aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Linskey2026-05-30 09:54:43 -0400
committerBenjamin Linskey2026-06-08 04:02:37 -0400
commit197ecfff9e99d57fe9539685316d3acf23f6cdfc (patch)
treec82c840d87329003d1623a4be2a281e70acfb729
parent4ca22e8b45d6af1bfa50dbd83db4589e74290bb9 (diff)
downloadrogue-197ecfff9e99d57fe9539685316d3acf23f6cdfc.tar.gz

Add makefile install and uninstall targets

-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index feda12b..5379b21 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= rogue
+PREFIX= /usr/local
+BIN_DIR:=$(PREFIX)/bin
CPPFLAGS+=-DUNIX -DUNIX_SYSV
SRCS= hit.c init.c inventory.c level.c machdep.c main.c \
message.c monster.c move.c object.c pack.c play.c random.c ring.c \
@@ -22,6 +24,15 @@ COPTS.score.c+= ${CC_WNO_FORMAT_TRUNCATION}
$(PROG): $(OBJS)
cc -o $@ -lcurses $(OBJS)
+.PHONY: install
+install: $(PROG)
+ chmod 755 $(PROG)
+ cp $(PROG) $(BIN_DIR)
+
+.PHONY: uninstall
+uninstall:
+ rm $(BIN_DIR)/$(PROG)
+
.PHONY: clean
clean:
rm -f $(PROG) $(OBJS) tags