From df9cd367a30b46a7a7e59159addabdf1b6aeb51b Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Tue, 2 Jul 2024 05:39:08 +0200 Subject: [PATCH] .so and .a target --- .gitignore | 2 ++ Makefile | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 46ca31e..32aec77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *.o *.s +*.so +*.a build driver diff --git a/Makefile b/Makefile index e1cb59a..49f09d0 100644 --- a/Makefile +++ b/Makefile @@ -39,8 +39,18 @@ driver: $(OBJECTS) run: driver @./driver +lib: $(OBJECTS) + @ar rcs librbuf.a ringbuf.o + +dylib: $(OBJECTS) + @$(CC) $(CFLAGS) -fPIC -shared -o librbuf.so ringbuf.o + +install: + @cp librbuf.a /usr/local/lib + @cp ringbuf.h /usr/local/include + clean: - rm -f $(OBJECTS) $(ASMS) driver + rm -f $(OBJECTS) $(ASMS) driver librbuf.a librbuf.so asm: $(ASMS) $(OBJECTS) wc -l $(ASMS)