]> git.sur5r.net Git - openldap/blob - contrib/whois++/Makefile
SLAPD_SCHEMA_NOT_COMPAT: ACL cleanup (not yet working)
[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 POSIX international support (format of dates), on ultrix
23 #
24 #INTERNATIONAL  = -DINTERNATIONAL
25 #
26 # If you want RFC931 logging you must have log_tcp source available
27 #
28 #RFC931DEF      = -DRFC931
29 #RFC931SRC      = /local/src/log_tcp/rfc931.c
30
31 SRCS    = whois++.c command.c config.c describe.c help.c output.c template.c \
32           util.c version.c $(RFC931SRC)
33 HDRS    = whois++.h
34 OBJS    = ${SRCS:.c=.o}
35 HOST    = `hostname`
36 # This returns a date such as "26 April 1993", unfortunately SunOS doesn't
37 # understand the %B abd %Y macros so you may need to change this.
38 #DATE   = `date +'%d %B %Y'`
39 DATE    = `date +'%D'`  # this gives 4/26/93 format
40 REVISION        = 2
41
42 DEFINES = -DETCDIR=\"$(ETCDIR)\" -DBUILD="\"$(USER)@$(HOST) on $(DATE)\"" \
43           -DCONFIG_DIRECTORY=\"$(CONFIG_DIRECTORY)\" -DMAIN \
44           -DHELP_DIRECTORY=\"$(HELP_DIRECTORY)\" -DREVISION="$(REVISION)" \
45           -DPROTOCOL="\"[FIRST DRAFT - 15 April 1993]\"" -DRELEASE=\"BETA\" \
46           -DFACILITY=$(FACILITY) -DDEFAULT_LDAPHOST=\"$(LDAPHOST)\" \
47           $(INTERNATIONAL) $(RFC931DEF)
48
49 CFLAGS  = -I$(LDAPSRC)/include -I/usr/local/include $(ACFLAGS)
50 LIBS    = -L$(LDAPSRC)/libraries/libldap -lldap -L$(LDAPSRC)/libraries/liblber \
51          -llber $(SYSLIBS) $(KRBLIBFLAG) $(KRBLIBS)
52
53 all:    whois++d
54
55 whois++d:       $(OBJS) $(LDAPSRC)/libraries/libldap/libldap.a
56         $(CC) $(ALDFLAGS) -o $@ $(OBJS) $(LIBS)
57
58 whois++.o:      whois++.c $(HDRS)
59         $(CC) $(CFLAGS) $(DEFINES) -c whois++.c
60
61 install:        inst-whois++
62
63 inst-whois++: $(DESTDIR)$(ETCDIR)/whois++d
64         -$(MKDIR) $(DESTDIR)$(CONFIG_DIRECTORY)
65         cp -r templates $(DESTDIR)$(CONFIG_DIRECTORY)
66         -$(MKDIR) $(DESTDIR)$(HELP_DIRECTORY)
67         cp -r helpfiles/* $(DESTDIR)$(HELP_DIRECTORY)
68         -$(MKDIR) $(DESTDIR)$(MANDIR)/man$(MANSEC)
69         sed -e 's#ETCDIR#$(ETCDIR)#' whois++d.man > $(DESTDIR)$(MANDIR)/man$(MANSEC)/whois++d.$(MANSEC)
70         @echo "Don't forget to modify and install the tailor file"
71
72 $(DESTDIR)$(ETCDIR)/whois++d: whois++d
73         install -c -m 755 whois++d $(DESTDIR)$(ETCDIR)
74
75 lint:;
76         lint $(SRCS)
77
78 5lint:;
79         /usr/5bin/lint $(SRCS)
80
81 clean:;
82         rm -f *.o core a.out whois++d
83
84 depend:;
85         ../mkdep $(CFLAGS) $(SRCS)
86
87 # DO NOT DELETE THIS LINE -- mkdep uses it.
88 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
89
90 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY