]> git.sur5r.net Git - openldap/blob - clients/gopher/Make-template
sasl updates
[openldap] / clients / gopher / 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 #       gopher to x.500 gateway makefile
13 #
14 #-----------------------------------------------------------------------------
15
16 LDAPSRC = ../..
17 HDIR    = $(LDAPSRC)/include
18 LDIR    = $(LDAPSRC)/libraries
19 VERSIONFILE = $(LDAPSRC)/build/version
20
21 SRCS    = go500.c go500gw.c detach.c setproctitle.c
22 OBJS    = go500.o go500gw.o detach.o setproctitle.o
23 GOOBJS  = go500.o detach.o goversion.o setproctitle.o
24 GWOBJS  = go500gw.o detach.o gwversion.o setproctitle.o
25
26 INCLUDES= -I$(HDIR)
27 DEFINES = $(DEFS)
28
29 CFLAGS  = $(INCLUDES) $(DEFS) $(ACFLAGS)
30 LIBS    = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS)
31
32 DLIBS   = $(LDIR)/libldap.a $(LDIR)/liblber.a
33
34 all:    go500gw go500
35
36 go500gw:        gwversion.o
37         $(CC) $(ALDFLAGS) -o $@ $(GWOBJS) -L$(LDIR) $(LIBS)
38
39 go500:  goversion.o
40         $(CC) $(ALDFLAGS) -o $@ $(GOOBJS) -L$(LDIR) $(LIBS)
41
42 goversion.c: go500.o detach.o setproctitle.o $(DLIBS)
43         $(RM) $@
44         (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
45         t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
46         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
47         -e "s|%VERSION%|$${v}|" \
48         < Version.c > $@)
49
50 gwversion.c: go500gw.o detach.o setproctitle.o $(DLIBS)
51         $(RM) $@
52         (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
53         t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
54         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
55         -e "s|%VERSION%|$${v}|" \
56         < Versiongw.c > $@)
57
58 install:        go500 go500gw go500gw.help FORCE
59         -$(MKDIR) -p $(ETCDIR)
60         $(INSTALL) $(INSTALLFLAGS) -m 755 go500 $(ETCDIR)
61         $(INSTALL) $(INSTALLFLAGS) -m 755 go500gw $(ETCDIR)
62         -$(MV) $(ETCDIR)/go500gw.help $(ETCDIR)/go500gw.help-
63         $(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(ETCDIR)
64
65 lint:   FORCE
66         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
67
68 5lint:  FORCE
69         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
70
71 clean:  FORCE
72         $(RM) *.o core a.out gwversion.c goversion.c go500gw go500
73
74 depend: FORCE
75         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
76
77 links:
78         @$(LN) .src/README .src/*.help .src/*.[ch] .
79
80 # DO NOT DELETE THIS LINE -- mkdep uses it.
81 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
82
83 go500.o: go500.c ../../include/portable.h ../../include/ldapconfig.h
84 go500.o: ../../include/lber.h ../../include/ldap.h ../../include/disptmpl.h
85 go500gw.o: go500gw.c ../../include/lber.h ../../include/ldap.h
86 go500gw.o: ../../include/disptmpl.h ../../include/portable.h
87 go500gw.o: ../../include/ldapconfig.h
88 detach.o: detach.c ../../include/portable.h
89 setproctitle.o: setproctitle.c
90
91 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY