openldap/servers/slapd/back-passwd/Make-template
Kurt Zeilenga b1d48b89ba Wrap $CC with quotes.
Patch provided by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
1998-09-16 04:18:42 +00:00

69 lines
1.9 KiB
Plaintext

#-----------------------------------------------------------------------------
# Copyright (c) 1995 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# /etc/passwd file backend to stand-alone LDAP server makefile
#
#-----------------------------------------------------------------------------
LDAPSRC = ../../..
HDIR = $(LDAPSRC)/include
LDIR = $(LDAPSRC)/libraries
VERSIONFILE = $(LDAPSRC)/build/version
SRCS = search.c config.c
OBJS = search.o config.o
INCLUDES= -I. -I.. -I$(HDIR)
DEFINES = $(DEFS) $(THREADS)
CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
all: FORCE
-@echo "$(SLAPD_BACKENDS)" | grep LDAP_PASSWD 2>&1 > /dev/null; \
if [ $$? = 0 ]; then \
$(MAKE) $(MFLAGS) CC="$(CC)" libback-passwd.a; \
else \
echo "Include -DLDAP_PASSWD in SLAPD_BACKENDS in the"; \
echo "Make-common file to build the passwd backend"; \
fi
libback-passwd.a: version.o
$(AR) ruv $@ $(OBJS) version.o
@if [ ! -z "$(RANLIB)" ]; then \
$(RANLIB) $@; \
fi
@touch ../.backend
version.c: $(OBJS)
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
< Version.c > $@)
install: FORCE
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
5lint: FORCE
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
clean: FORCE
$(RM) libback-passwd.a *.o core a.out version.c
depend: FORCE
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
links:
@$(LN) .src/*.[ch] .