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