openldap/clients/fax500/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

78 lines
2.4 KiB
Plaintext

#-----------------------------------------------------------------------------
# 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.
#
# X.500 ldap fax mailer makefile
#
#-----------------------------------------------------------------------------
LDAPSRC = ../..
HDIR = $(LDAPSRC)/include
LDIR = $(LDAPSRC)/libraries
VERSIONFILE = $(LDAPSRC)/build/version
SRCS = rp500.c main.c faxtotpc.c
OBJS = rp500.o main.o faxtotpc.o
INCLUDES= -I$(HDIR)
DEFINES = $(DEFS)
CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS)
all: rp500 fax500
rp500: rpversion.o
$(CC) $(ALDFLAGS) -o $@ faxtotpc.o rp500.o rpversion.o \
-L$(LDIR) $(LIBS)
fax500: fax5version.o
$(CC) $(ALDFLAGS) -o $@ main.o fax5version.o faxtotpc.o \
-L$(LDIR) $(LIBS)
rpversion.c: faxtotpc.o rp500.o $(LDIR)/libldap.a
$(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}|" \
< Versionrp.c > $@)
fax5version.c: main.o faxtotpc.o $(LDIR)/libldap.a
$(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 > $@ )
install: rp500 xrpcomp fax500 FORCE
-$(MKDIR) -p $(LDAP_ETCDIR) $(LDAP_BINDIR)
$(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(LDAP_LIBEXECDIR)
$(SED) -e 's%ETCDIR%$(LDAP_LIBEXECDIR)%' xrpcomp > /tmp/xrpcomp.tmp
$(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(LDAP_BINDIR)/xrpcomp
$(RM) /tmp/xrpcomp.tmp
$(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(LDAP_LIBEXECDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
5lint: FORCE
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
clean: FORCE
$(RM) *.o core a.out rpversion.c fax5version.c rp500 fax500
depend: FORCE
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
links:
@$(LN) .src/README .src/xrpcomp .src/*.[ch] .