diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0f966f --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +.PHONY: all install clean + +PREFIX = $(HOME)/.local + +CC = clang +CFLAGS = -std=c90 -Weverything -fPIC + +all: libayylmao.a libayylmao.so + +install: libayylmao.so libayylmao.a + mkdir -p -- $(PREFIX)/lib $(PREFIX)/include + install -- ayylmao.h $(PREFIX)/include + install -- libayylmao.so libayylmao.a $(PREFIX)/lib + +clean: + rm -f -- *.a *.o *.so + +libayylmao.a: ayy.o lmao.o + ar rcs "$@" ayy.o lmao.o + +libayylmao.so: ayy.o lmao.o + $(CC) $(CFLAGS) -shared -Wl,-soname,"$@" -o "$@" ayy.o lmao.o |