summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoruint23 <https://uint23.xyz/>2025-04-20 06:13:41 +0100
committeruint23 <https://uint23.xyz/>2025-04-20 06:13:41 +0100
commit3036894841fce9b73e6b34779eeabbe326e19302 (patch)
tree5c8e88c3b9cff8c86c7b092e1a69616ba3f3050f /Makefile
parent4b53891cac71bb7d48410dd795c9a7a913cb657d (diff)
fullscr support + readme glowup + makefile glowup gaaaaashhh
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 64b0b60..b31c83d 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ SRC_DIR = src
SRC = $(wildcard $(SRC_DIR)/*.c)
OBJ = $(SRC:.c=.o)
BIN = sxwm
+PREFIX = /usr/local
all: $(BIN)
@@ -15,7 +16,20 @@ $(BIN): $(OBJ)
$(SRC_DIR)/%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -c -o $@ $<
-c:
+clean:
rm -f $(SRC_DIR)/*.o $(BIN)
-.PHONY: all c
+install: all
+ @echo "Installing $(BIN) to $(DESTDIR)$(PREFIX)/bin..."
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @install -m 755 $(BIN) $(DESTDIR)$(PREFIX)/bin/$(BIN)
+ @echo "Installation complete."
+
+uninstall:
+ @echo "Uninstalling $(BIN) from $(DESTDIR)$(PREFIX)/bin..."
+ @rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
+ @echo "Uninstallation complete."
+
+clean-install: clean install
+
+.PHONY: all clean install uninstall clean-install