1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1995 Regents of the University of Michigan.
5 # Redistribution and use in source and binary forms are permitted
6 # provided that this notice is preserved and that due credit is given
7 # to the University of Michigan at Ann Arbor. The name of the University
8 # may not be used to endorse or promote products derived from this
9 # software without specific prior written permission. This software
10 # is provided ``as is'' without express or implied warranty.
12 # makefile for shell backends to use with stand-alone LDAP server
14 #-----------------------------------------------------------------------------
16 HDIR = $(LDAPSRC)/include
17 LDIR = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
23 PWDSRCS = passwd-shell.c
24 PWDOBJS = passwd-shell.o pwd-version.o
26 INCLUDES= -I. -I.. -I$(HDIR)
27 DEFINES = $(DEFS) $(THREADS)
28 CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
29 LDFLAGS = -L$(LDIR) $(KRBLIBFLAG)
30 LIBS = -llber $(KRBLIBS) $(ALIBS)
34 passwd-shell: $(PWDOBJS) $(CMNOBJS)
35 $(CC) $(ALDFLAGS) -o $@ $(PWDOBJS) $(CMNOBJS) \
38 pwd-version.c: $(OBJS)
40 (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
41 t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
42 -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
43 -e "s|%VERSION%|$${v}|" \
49 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
52 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
55 $(RM) passwd-shell pwd-version.c *.o core a.out version.c
58 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
63 # DO NOT DELETE THIS LINE -- mkdep uses it.
64 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
66 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY