Commit a8ac4ef5 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add Makefile templates for clients

parent adf3d5a2
SRCS= main.c faxtotpc.c rp500.c
XSRCS=fax5version.c rpversion.c
FAX5OBJS = main.o faxtotpc.o
RPOBJS = rp500.o faxtotpc.o
PROGRAMS= rp500 fax500
rp500 : rpversion.o
$(CC) $(LDFLAGS) -o $@ $(RPOBJS) rpversion.o $(LIBS)
fax500 : fax5version.o
$(CC) $(LDFLAGS) -o $@ $(RPOBJS) fax5version.o $(LIBS)
rpversion.c: ${RPOBJS} $(LDAP_LIBDEPEND)
$(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: ${FAX5OBJS} $(LDAP_LIBDEPEND)
$(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: $(PROGRAMS) xrpcomp FORCE
-$(MKDIR) -p $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(libexecdir)
$(SED) -e 's%LIBEXECDIR%$(libexecdir)%' xrpcomp > /tmp/xrpcomp.tmp
$(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(libexecdir)/xrpcomp
$(RM) /tmp/xrpcomp.tmp
: run this script through /bin/sh
#! /bin/sh
RP500=ETCDIR/rp500
RP500=%LIBEXECDIR%/rp500
NAME="$1"
if [ -z "$NAME" ]; then
......
SRCS= main.c
XSRVS= version.c
OBJS= main.o
PROGRAMS= in.xfingerd
in.xfingerd : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
version.c: ${OBJS} $(LDAP_LIBDEPEND)
$(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: $(PROGRAMS) FORCE
-$(MKDIR) -p $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(libexecdir)
##
## Makefile for gopher clients
##
PROGRAMS= go500gw go500
SRCS= detach.c go500.c go500gw.c setproctitle.c
XSRCS= gwversion.o goversion.o
GOOBJS = go500.o detach.o setproctitle.o
GWOBJS = go500gw.o detach.o setproctitle.o
go500 : goversion.o
$(CC) $(LDFLAGS) -o $@ $(GOOBJS) goversion.o $(LIBS)
go500gw : gwversion.o
$(CC) $(LDFLAGS) -o $@ $(GWOBJS) gwversion.o $(LIBS)
goversion.c: ${GOOBJS} $(LDAP_LIBDEPEND)
$(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: ${GWOBJS} $(LDAP_LIBDEPEND)
$(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: $(PROGRAMS) go500gw.help FORCE
-$(MKDIR) -p $(libexecdir) $(sysconfdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 go500 $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 go500gw $(libexecdir)
-$(MV) $(sysconfdir)/go500gw.help $(sysconfdir)/go500gw.help-
$(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(sysconfdir)
PROGRAMS= mail500
SRCS= main.c
XSRCS= version.c
OBJS= main.o
mail500 : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
version.c: ${OBJS} $(LDAP_LIBDEPEND)
$(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: $(PROGRAMS) FORCE
-$(MKDIR) -p $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 mail500 $(libexecdir)
PROGRAMS= rcpt500
SRCS= main.c cmds.c help.c query.c
XSRCS= version.c
OBJS= main.o cmds.o help.o query.o
HDRS= rcpt500.h
rcpt500 : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
version.c: ${OBJS} $(LDAP_LIBDEPEND)
$(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: $(PROGRAMS) rcpt500.help FORCE
-$(MKDIR) -p $(libexecdir) $(sysconfdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(sysconfdir)
##
## Makefile for LDAP tools
##
SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c
OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o
XLIBS = -llber -lldap
XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c
PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd
ldapsearch: ldsversion.o
$(CC) $(LDFLAGS) -o $@ ldapsearch.o ldsversion.o $(LIBS)
ldapmodify: ldmversion.o
$(CC) $(LDFLAGS) -o $@ ldapmodify.o ldmversion.o $(LIBS)
ldapdelete: lddversion.o
$(CC) $(LDFLAGS) -o $@ ldapdelete.o lddversion.o $(LIBS)
ldapmodrdn: ldrversion.o
$(CC) $(LDFLAGS) -o $@ ldapmodrdn.o ldrversion.o $(LIBS)
ldapadd: ldapmodify
$(RM) $@
$(LN) ldapmodify ldapadd
ldsversion.c: ldapsearch.o $(LDAP_LIBDEPEND)
$(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}|" \
< Versionlds.c > $@)
ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND)
$(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}|" \
< Versionldm.c > $@)
lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND)
$(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}|" \
< Versionldd.c > $@)
ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND)
$(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}|" \
< Versionldr.c > $@)
installlocal: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE
-$(MKDIR) -p $(bindir)
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(bindir)
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(bindir)
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(bindir)
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(bindir)
$(RM) $(BINDIR)/ldapadd
$(LN) $(BINDIR)/ldapmodify $(bindir)/ldapadd
SRCS= main.c find.c mod.c print.c auth.c util.c help.c \
string_to_key.c group.c edit.c globals.c
XSRCS= version.c
OBJS= main.o find.o mod.o print.o auth.o util.o help.o \
string_to_key.o group.o globals.o edit.o
HDRS= ud.h
PROGRAMS= ud
XLIBS = $(LIBTERMCAP)
ud : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
version.c: ${OBJS} $(LDAP_LIBDEPEND)
$(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: $(PROGRAMS) FORCE
-$(MKDIR) -p $(bindir)
-mv -f $(bindir)/ud $(bindir)/ud-
$(INSTALL) $(INSTALLFLAGS) -m 775 ud $(bindir)
......@@ -333,13 +333,6 @@ AC_SUBST(LDBM_DEFS)
AC_SUBST(LDBM_LIBS)
dnl AC_OUTPUT( \
dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
dnl clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
dnl clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
dnl clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
dnl clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
dnl clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
dnl clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \
......@@ -356,6 +349,13 @@ dnl [date > stamp-h])
AC_OUTPUT( \
clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
include/Makefile:build/top.mk:include/Makefile.in \
libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \
libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment