From 9f6108784ceb997ce388e5212d36ed86ad3934df Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sat, 29 Oct 2022 13:37:41 -0400 Subject: Initial commit --- Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..44dd1d4 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +CC=gcc +CFLAGS=-I. -Wall -fPIC +MAJOR=0 +MINOR=1 +VERSION=$(MAJOR).$(MINOR) +NAME=clog +DESTDIR?=/usr/local/lib + +LFLAGS= + +%.o: %.c + $(CC) -c -o $@ $< $(CFLAGS) + +lib: lib$(NAME).so.$(VERSION) + +lib$(NAME).so: + ldconfig -v -n + ln -s lib$(NAME).so.$(MAJOR) lib$(NAME).so + +lib$(NAME).so.$(VERSION): $(NAME).o + $(CC) -shared $^ -o $@ + +install: lib + install -Dm644 lib$(NAME).so.$(VERSION) $(DESTDIR) + install -Dm644 $(NAME).h /usr/include/ + +clean: + rm -f lib$(NAME)* + rm -f src/*.o + -- cgit v1.2.3