openldap/clients/gopher/Make-template
Kurt Zeilenga d2ef362f99 Removed use of paths not defined in ldapconfig.h.edit.
Fixed Dependency Generation not to mess with Make-templates.
	side effect: depends are not carried forward after "make makefiles"
1998-08-20 03:56:19 +00:00

79 lines
2.5 KiB
Text

#-----------------------------------------------------------------------------
# Copyright (c) 1994 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# gopher to x.500 gateway makefile
#
#-----------------------------------------------------------------------------
LDAPSRC = ../..
HDIR = $(LDAPSRC)/include
LDIR = $(LDAPSRC)/libraries
VERSIONFILE = $(LDAPSRC)/build/version
SRCS = go500.c go500gw.c detach.c setproctitle.c
OBJS = go500.o go500gw.o detach.o setproctitle.o
GOOBJS = go500.o detach.o goversion.o setproctitle.o
GWOBJS = go500gw.o detach.o gwversion.o setproctitle.o
INCLUDES= -I$(HDIR)
DEFINES = $(DEFS)
CFLAGS = $(INCLUDES) $(DEFS) $(ACFLAGS)
LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS)
DLIBS = $(LDIR)/libldap.a $(LDIR)/liblber.a
all: go500gw go500
go500gw: gwversion.o
$(CC) $(ALDFLAGS) -o $@ $(GWOBJS) -L$(LDIR) $(LIBS)
go500: goversion.o
$(CC) $(ALDFLAGS) -o $@ $(GOOBJS) -L$(LDIR) $(LIBS)
goversion.c: go500.o detach.o setproctitle.o $(DLIBS)
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
< Version.c > $@)
gwversion.c: go500gw.o detach.o setproctitle.o $(DLIBS)
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
< Versiongw.c > $@)
install: go500 go500gw go500gw.help FORCE
-$(MKDIR) -p $(LDAP_ETCDIR) $(LDAP_LIBEXECDIR)
$(INSTALL) $(INSTALLFLAGS) -m 755 go500 $(LDAP_LIBEXECDIR)
$(INSTALL) $(INSTALLFLAGS) -m 755 go500gw $(LDAP_LIBEXECDIR)
-$(MV) $(LDAP_ETCDIR)/go500gw.help $(LDAP_ETCDIR)/go500gw.help-
$(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(LDAP_ETCDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
5lint: FORCE
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
clean: FORCE
$(RM) *.o core a.out gwversion.c goversion.c go500gw go500
depend: FORCE
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
links:
@$(LN) .src/README .src/*.help .src/*.[ch] .