diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..318be6b0e2de13e0228d287549c9b0cae8a86cdc --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +VERSION=1.0 +MODULES=conditional_ldap +MODULES_conditional_ldap.so=conditional_ldap +DISTFILES=Makefile conditional_ldap.c + +all: $(MODULES:%=libnss_%.so.2) + +libnss_%.so.2: %.so + cp -p $< $@ + +%.pic.o %.o: %.c + gcc -Wall -Werror -fPIC -DPIC -o $@ -c $< + +conditional_ldap.so: $(MODULES_conditional_ldap.so:%=%.pic.o) + gcc -shared $^ -ldl -Wl,-znodelete -Wl,-soname -o $@ + +install: + install -d $(DESTDIR)/$(LIBDIR) + install $(MODULES:%=libnss_%.so.2) $(DESTDIR)/$(LIBDIR) + +TAR: + tar -cvzf conditional_ldap-$(VERSION).tar.gz \ + --transform='s|.*|conditional_ldap-$(VERSION)/&|g' \ + $(DISTFILES)