summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
author0x221E2026-04-23 03:27:41 +0200
committer0x221E2026-04-23 03:27:41 +0200
commit7303d05207297d1f72c5c73eb4b175cdd6da44c4 (patch)
treea56f3b41a8b17975abe13348fb097707760ee4eb /Makefile
parent14393807165e9379adbbea671748a6c27bf34847 (diff)
build: add install command to Makefile
To create a system-wide utility after latest changes, Makefile now has the utility to install the binary to the system.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e54c550..54f9d48 100644
--- a/Makefile
+++ b/Makefile
@@ -16,13 +16,21 @@ $(BUILD_DIR)/%.c.o: %.c
@echo "[CC] Compiled $< to $@"
debug: $(OBJ_FILES)
- @$(CC) $(OBJ_FILES) -o $(TARGET_EXEC) -g $(CFLAGS)
+ @$(CC) $(OBJ_FILES) -o $(TARGET_EXEC) -g $(CFLAGS) -DDEBUG -fsanitize=address
+ @echo "[DONE] Finished compiling $(TARGET_EXEC) in debug build."
+
+debug-nosan: $(OBJ_FILES)
+ @$(CC) $(OBJ_FILES) -o $(TARGET_EXEC) -g -DDEBUG $(CFLAGS)
@echo "[DONE] Finished compiling $(TARGET_EXEC) in debug build."
prod: $(OBJ_FILES)
@$(CC) $(OBJ_FILES) -o $(TARGET_EXEC) $(CFLAGS)
@echo "[DONE] Finished compiling $(TARGET_EXEC) in production build."
+install: prod
+ @cp ./pkgman /usr/bin/
+ @echo "Installed application to /usr/bin"
+
clean:
@rm -rf build/
@rm pkgman