.so and .a target

This commit is contained in:
Imbus 2024-07-02 05:39:08 +02:00
parent 07bb60c8ae
commit df9cd367a3
2 changed files with 13 additions and 1 deletions

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
*.o
*.s
*.so
*.a
build
driver

View file

@ -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)