From 7a33cf64306b33a1c2e5e8efbcf6ae148dca5ae8 Mon Sep 17 00:00:00 2001 From: Mikhail Kobuk Date: Sat, 22 Nov 2025 01:43:00 +0300 Subject: upd: add string search in array --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e5e8c89 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +AVER=1 +SRCA=arktixord.c +SRC=ark_string.c +OBJ=$(SRCA:%.c=%.o) +OBJ+=$(SRC:%.c=%.o) +INCDIR=/usr/local/include +LIBDIR=/usr/local/lib + +default: install + +install: libarktixord.so arktixord.h + install -v -m644 ./arktixord.h $(INCDIR)/arktixord.h + install -v -m755 -s ./libarktixord.so $(LIBDIR)/libarktixord.so.$(AVER) + ln -sf $(LIBDIR)/libarktixord.so.1 $(LIBDIR)/libarktixord.so + ldconfig + +libarktixord.so: $(OBJ) arktixord.h + gcc $(LDFLAGS) $(LDLIBS) -shared -o $@ $^ + +%.o: %.c + gcc $(CFLAGS) -c -fPIC $< -o $@ + +clean: + rm -f *.o libarktixord.so + +uninstall: + sudo rm -rf $(INCDIR)/arktixord.h + sudo rm -rf $(LIBDIR)/libarktixord.so + sudo rm -rf $(LIBDIR)/libarktixord.so.$(AVER) + ldconfig + +.PHONY: default lib install clean -- cgit v1.2.3-70-g09d2