]> git.sur5r.net Git - openldap/blob - contrib/whois++/Makefile
Update lutil_lockf (aka: ldap_lockf) to hide implementation in
[openldap] / contrib / whois++ / Makefile
1 #
2 # Configuration parameters, can be overridden in config file
3 #
4 LDAPSRC         = ../..
5 CONFIG_DIRECTORY        =       $(ETCDIR)/whois++
6 HELP_DIRECTORY  =       /usr/local/isode/help/whois++
7 LDAPHOST        = "localhost"
8 #
9 # Where to stuff the man page
10 MANDIR          = /usr/local/isode/man
11 MANSEC          = 8
12 #
13 # Syslog facility to log queries under, using info serverity level
14 #
15 FACILITY        = LOG_LOCAL3
16 #
17 # Additional system libraries
18 # Under Ultrix I use the 4.3 syslog, hence the additional syslog library
19 #
20 #SYSLIBS        = -li -lsyslog
21 #
22 # If you want RFC931 logging you must have log_tcp source available
23 #
24 SRCS    = whois++.c command.c config.c describe.c help.c output.c template.c \
25           util.c version.c # /local/src/log_tcp/rfc931.c
26 HDRS    = whois++.h
27 OBJS    = ${SRCS:.c=.o}
28 HOST    = `hostname`
29 # This returns a date such as "26 April 1993", unfortunately SunOS doesn't
30 # understand the %B abd %Y macros so you may need to change this.
31 #DATE   = `date +'%d %B %Y'`
32 DATE    = `date +'%D'`  # this gives 4/26/93 format
33 REVISION        = 2
34
35 DEFINES = -DETCDIR=\"$(ETCDIR)\" -DBUILD="\"$(USER)@$(HOST) on $(DATE)\"" \
36           -DCONFIG_DIRECTORY=\"$(CONFIG_DIRECTORY)\" -DMAIN \
37           -DHELP_DIRECTORY=\"$(HELP_DIRECTORY)\" -DREVISION="$(REVISION)" \
38           -DPROTOCOL="\"[FIRST DRAFT - 15 April 1993]\"" -DRELEASE=\"BETA\" \
39           -DFACILITY=$(FACILITY) -DDEFAULT_LDAPHOST=\"$(LDAPHOST)\" # -DRFC931
40
41 CFLAGS  = -I$(LDAPSRC)/include -I/usr/local/include $(ACFLAGS)
42 LIBS    = -L$(LDAPSRC)/libraries/libldap -lldap -L$(LDAPSRC)/libraries/liblber \
43          -llber $(SYSLIBS) $(KRBLIBFLAG) $(KRBLIBS)
44
45 all:    whois++d
46
47 whois++d:       $(OBJS) $(LDAPSRC)/libraries/libldap/libldap.a
48         $(CC) $(ALDFLAGS) -o $@ $(OBJS) $(LIBS)
49
50 whois++.o:      whois++.c $(HDRS)
51         $(CC) $(CFLAGS) $(DEFINES) -c whois++.c
52
53 install:        inst-whois++
54
55 inst-whois++:   $(ETCDIR)/whois++d
56         -mkdir -p $(CONFIG_DIRECTORY)
57         cp -r templates $(CONFIG_DIRECTORY)
58         -mkdir -p $(HELP_DIRECTORY)
59         cp -r helpfiles/* $(HELP_DIRECTORY)
60         sed -e 's#ETCDIR#$(ETCDIR)#' whois++d.man > $(MANDIR)/man$(MANSEC)/whois++d.$(MANSEC)
61         @echo "Don't forget to modify and install the tailor file"
62
63 $(ETCDIR)/whois++d:     whois++d
64         install -c -m 755 whois++d $(ETCDIR)
65
66 lint:;
67         lint $(SRCS)
68
69 5lint:;
70         /usr/5bin/lint $(SRCS)
71
72 clean:;
73         rm -f *.o core a.out whois++d
74
75 depend:;
76         ../mkdep $(CFLAGS) $(SRCS)
77
78 # DO NOT DELETE THIS LINE -- mkdep uses it.
79 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
80
81 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY