Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
prefix=
ifeq "$(prefix)" ""
root_prefix=
usr_prefix=/usr
else
root_prefix=$(prefix)
usr_prefix=$(prefix)
endif
root_exec_prefix=$(root_prefix)
root_bindir=$(root_exec_prefix)/bin
root_sbindir=$(root_exec_prefix)/sbin
usr_exec_prefix=$(usr_prefix)
usr_bindir=$(usr_exec_prefix)/bin
usr_sbindir=$(usr_exec_prefix)/sbin
sysconfdir=$(prefix)/etc
root_libexecdir=$(root_prefix)/lib
usr_libexecdir=$(usr_prefix)/lib
INSTALL=install -v
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
ifdef DEBUG
CFLAGS=-O0 -g -Wall -DDEBUG_MAX_CONNECTS=10
else
CFLAGS=-O3 -Wall -Werror
endif
all: mxshadowsrv libnss_mxshadow.so.2 test_server test_query_shadow
libnss_mxshadow.so.2: libnss_mxshadow.c get_shadow_line.c common.h
gcc $(CFLAGS) -shared -o libnss_mxshadow.so.2 -Wl,-soname,libnss_mxshadow.so.2,-unresolved-symbols=report-all -fPIC libnss_mxshadow.c -l:libssl.a -l:libcrypto.a -lpthread -ldl
test_server: test_server.c get_shadow_line.c common.h
gcc $(CFLAGS) -o test_server test_server.c -l:libssl.a -l:libcrypto.a -lpthread -ldl
test_query_shadow: test_query_shadow.c
gcc $(CFLAGS) -o test_query_shadow test_query_shadow.c
mxshadowsrv: mxshadowsrv.c common.h
gcc $(CFLAGS) -o mxshadowsrv mxshadowsrv.c -l:libssl.a -l:libcrypto.a -lpthread -ldl
clean:
@rm *.o libnss_mxshadow.so.2 mxshadowsrv test_server test_query_shadow 2>/dev/null || true
install: all
$(INSTALL) -D -t $(DESTDIR)$(usr_sbindir) mxshadowsrv
$(INSTALL) -D -t $(DESTDIR)$(root_libexecdir) libnss_mxshadow.so.2
ln -sf libnss_mxshadow.so.2 $(DESTDIR)$(root_libexecdir)/libnss_mxshadow.so
.PHONY: all clean install