aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-07-23 12:36:36 +0800
committerMistivia <i@mistivia.com>2025-07-23 12:45:25 +0800
commit0a7e5145fb82c0d6e49dab457ac467ab4bf6d3be (patch)
tree295f97e1c2782b04c8e7280299cb0d27b1bdba95 /Makefile
parent10307e1c102afc977cbf8592cb88ccb0d9445b6f (diff)
add install
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files 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