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)