From ef9ab1fd141f4057d41f2d6ed8ab8d67c44894d5 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 9 Jan 2025 16:32:55 -0800 Subject: save state --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 287a5d8..e83dfd8 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,13 @@ RAMEN_OBJ := $(RAMEN_SRC:$(RAMEN_DIR)/%.c=$(RAMEN_OBJ_DIR)/%.o) MSG_SRC := $(wildcard $(MSG_DIR)/*.c) MSG_OBJ := $(MSG_SRC:$(MSG_DIR)/%.c=$(MSG_OBJ_DIR)/%.o) +DESTDIR := /usr/local/bin + LDFLAGS := LDLIBS := LDFLAGS += $(NIX_LDFLAGS_COMPILE) -.PHONY: all clean +.PHONY: all clean install all: $(RAMEN_EXE) $(MSG_EXE) @@ -51,4 +53,8 @@ $(BIN_DIR) $(OBJ_DIR) $(MSG_OBJ_DIR) $(RAMEN_OBJ_DIR): clean: @$(RM) -rv $(BIN_DIR) $(OBJ_DIR) $(MSG_OBJ_DIR) $(RAMEN_OBJ_DIR) result +install: + install -m 755 $(BIN_DIR)/ramen $(DESTDIR) + install -mm 755 $(BIN_DIR)/msg $(DESTDIR) + -include $(OBJ:.o=.d) -- cgit