1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1994 Regents of the University of Michigan.
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.
12 # gopher to x.500 gateway makefile
14 #-----------------------------------------------------------------------------
17 HDIR = $(LDAPSRC)/include
18 LDIR = $(LDAPSRC)/libraries
19 VERSIONFILE = $(LDAPSRC)/build/version
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
29 CFLAGS = $(INCLUDES) $(DEFS) $(ACFLAGS)
30 LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS)
32 DLIBS = $(LDIR)/libldap.a $(LDIR)/liblber.a
37 $(CC) $(ALDFLAGS) -o $@ $(GWOBJS) -L$(LDIR) $(LIBS)
40 $(CC) $(ALDFLAGS) -o $@ $(GOOBJS) -L$(LDIR) $(LIBS)
42 goversion.c: go500.o detach.o setproctitle.o $(DLIBS)
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}|" \
50 gwversion.c: go500gw.o detach.o setproctitle.o $(DLIBS)
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}|" \
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)
66 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
69 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
72 $(RM) *.o core a.out gwversion.c goversion.c go500gw go500
75 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
78 @$(LN) .src/README .src/*.help .src/*.[ch] .
80 # DO NOT DELETE THIS LINE -- mkdep uses it.
81 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
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
91 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY