]> git.sur5r.net Git - openldap/blob - clients/rcpt500/Make-template
Modified make system to support CVS instead of RCS
[openldap] / clients / rcpt500 / Make-template
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1994 Regents of the University of Michigan.
3 # All rights reserved.
4 #
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.
11 #
12 #       X.500 ldap rcpt500 mail query responder makefile
13 #
14 #-----------------------------------------------------------------------------
15 LDAPSRC = ../..
16 HDIR    = $(LDAPSRC)/include
17 LDIR    = $(LDAPSRC)/libraries
18 VERSIONFILE = $(LDAPSRC)/build/version
19
20 SRCS= main.c cmds.c help.c query.c
21 OBJS= main.o cmds.o help.o query.o
22
23 INCLUDES= -I$(HDIR)
24 DEFINES = $(DEFS)
25 CFLAGS  = $(INCLUDES) $(DEFINES) $(ACFLAGS)
26 LIBS    = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS)
27
28 all:    rcpt500
29
30 rcpt500:        version.o
31         $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o -L$(LDIR) $(LIBS)
32
33 version.c: $(OBJS) $(LDIR)/libldap.a
34         $(RM) $@
35         (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
36         t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
37         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
38         -e "s|%VERSION%|$${v}|" \
39         < Version.c > $@)
40
41 install:        rcpt500 rcpt500.help FORCE
42         -$(MKDIR) -p $(ETCDIR)
43         $(INSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(ETCDIR)
44         $(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(ETCDIR)
45
46 lint:   FORCE
47         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
48
49 5lint:  FORCE
50         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
51
52 clean:  FORCE
53         $(RM) *.o core a.out version.c rcpt500
54
55 depend: FORCE
56         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
57
58 links:
59         @$(LN) .src/README .src/*.[ch] .src/*.help .
60
61 # DO NOT DELETE THIS LINE -- mkdep uses it.
62 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
63
64 main.o: main.c ../../include/portable.h
65 cmds.o: cmds.c
66 help.o: help.c ../../include/portable.h
67 query.o: query.c ../../include/proto-lber.h ../../include/proto-ldap.h
68 query.o: ../../include/ldapconfig.h
69
70 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY