]> git.sur5r.net Git - openldap/blob - contrib/tweb/Makefile.openldap
fixed test on "" (empty) parent dn
[openldap] / contrib / tweb / Makefile.openldap
1 #*_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
2 #                                                                          *
3 # Makefile...                                                              *
4 #                                                                          *
5 # Function:..TWEB WWW to X.500-GATEWAY SERVER MAKEFILE                     *
6 #                                                                          *
7 #                                                                          *
8 #                                                                          *
9 # Authors:...Dr. Kurt Spanier & Bernhard Winkler,                          *
10 #            Zentrum fuer Datenverarbeitung,                               *
11 #            Bereich Entwicklungneuer Dienste,                             *
12 #            Universitaet Tuebingen, GERMANY                               *
13 #                                                                          *
14 #                                       ZZZZZ  DDD    V   V                *
15 #            Creation date:                Z   D  D   V   V                *
16 #            August 16 1995               Z    D   D   V V                 *
17 #            Last modification:          Z     D  D    V V                 *
18 #            September 13 1999          ZZZZ   DDD      V                  *
19 #                                                                          *
20 #/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/*/
21 #-----------------------------------------------------------------------------
22 #
23 #  based on web500gw.c of Frank Richter, TU Chemnitz-Zwickau, DE
24 #
25 #  first edition: 95/07/28, /KSp
26 #
27 #  $Id: Makefile.openldap,v 1.6 1999/09/10 15:01:15 zrnsk01 Exp $
28 #
29 #-----------------------------------------------------------------------------
30
31 #########################################################################
32 ###
33 ###  Tailor the following to your local settings
34 ###
35 #########################################################################
36
37 # where is your LDAP client library located
38 # WE NEED portable.h AND ldap_log.h, SO POINT TO THE SOURCE TREE
39 LDAP_RUNTIME=../..
40 LDAP_SOURCE =../..
41
42 LIBDIR= $(LDAP_RUNTIME)/libraries
43 INCDIR= $(LDAP_RUNTIME)/include
44
45 # where is some version information for your LDAP client library
46 LDAPDIR= $(LDAP_SOURCE)/build
47
48 # select your compiler (DEFAULT=cc) and uncomment ACFLAGS and/or COPTS
49 # to have options for the linker and/or compiler
50 CC= gcc
51 # ACFLAGS= 
52 # COPTS= -Aa -O  # cc  on a HP box
53 COPTS= -Wall -ansi -pedantic -O2
54
55 # uncomment next line when compiling on SUN
56 # LXNET = -lxnet
57
58 # we don't have any special definitions for the current distribution
59 # DEFINES= 
60
61 #########################################################################
62 ###
63 ###  You should leave the following definitions untouched
64 ###
65 #########################################################################
66
67 SRCS    = tweb.c strng.c init.c queries.c server.c \
68                   x500.c html.c support.c checkclient.c \
69                   charray.c ch_malloc.c dn.c regular.c
70 OBJS    = tweb.o strng.o init.o queries.o server.o \
71                   x500.o html.o support.o checkclient.o \
72                   charray.o ch_malloc.o dn.o regular.o
73 GWOBJS  = $(OBJS) gwversion.o
74
75 CFLAGS  = $(COPTS) -I$(INCDIR) $(ACFLAGS) $(DEFINES) $(GWVERS)
76 LIBS    = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(LXNET)
77 DLIBS   = $(LIBDIR)/libldap.a $(LIBDIR)/liblber.a
78
79 gw:     gwversion.o
80         $(CC) $(ALDFLAGS) -o $@ $(GWOBJS) -L$(LIBDIR) $(LIBS)
81         mv $@ tweb
82
83 gwversion.c: $(OBJS) $(DLIBS)
84         rm -f $@
85         (u=$${USER-root} v=`cat $(LDAPDIR)/version` d=`pwd` h=`hostname` t=`date`; \
86         sed -e "s|%WHEN%|$${t}|" \
87         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
88         -e "s|%VERSION%|$${v}|" \
89         < Versiongw.c > $@)
90
91 lint:;
92         lint -I. $(SRCS)
93
94 5lint:;
95         /usr/5bin/lint -I. $(SRCS)
96
97 clean:;
98         rm -f *.o core a.out gwversion.c tweb 
99
100 depend:;
101         $(LDAPDIR)/mkdep $(CFLAGS) $(SRCS)
102
103 # DO NOT DELETE THIS LINE -- mkdep uses it.
104 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
105
106 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY