From 0a7e5145fb82c0d6e49dab457ac467ab4bf6d3be Mon Sep 17 00:00:00 2001 From: Mistivia Date: Wed, 23 Jul 2025 12:36:36 +0800 Subject: add install --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6ae975c..25a1bef 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ ifeq ($(mode), debug) -g \ -fsanitize=address else - cflags = -flto -O2 + cflags = -O2 endif src = $(shell ls *.c) @@ -20,6 +20,11 @@ all: libalgds.a libalgds.a: $(obj) ar cr $@ $^ +install: libalgds.a + sudo mkdir -p /usr/local/include/algds + sudo cp *.h /usr/local/include/algds + sudo cp libalgds.a /usr/local/lib + test: $(tests_bin) @echo @echo "Run tests:" @@ -36,7 +41,7 @@ clean: -rm $(shell find tests/ -name '*.bin') -rm $(shell find . -name '*.o' -or -name '*.a' -or -name '*.d') -DEPS := $(shell find . -name *.d) +DEPS := $(shell find . -name '*.d') ifneq ($(DEPS),) include $(DEPS) endif -- cgit v1.0