head	1.24;
access;
symbols;
locks; strict;
comment	@# @;


1.24
date	95.04.25.16.27.28;	author ghudson;	state Exp;
branches;
next	1.23;

1.23
date	95.01.14.19.35.53;	author ghudson;	state Exp;
branches;
next	1.22;

1.22
date	92.12.16.18.40.20;	author root;	state Exp;
branches;
next	1.21;

1.21
date	91.08.14.23.06.59;	author jik;	state Exp;
branches;
next	1.20;

1.20
date	91.08.09.22.52.48;	author jik;	state Exp;
branches;
next	1.19;

1.19
date	91.08.02.06.52.55;	author jik;	state Exp;
branches;
next	1.18;

1.18
date	91.08.02.06.44.55;	author jik;	state Exp;
branches;
next	1.17;

1.17
date	91.07.19.07.39.07;	author probe;	state Exp;
branches;
next	1.16;

1.16
date	91.07.16.17.33.11;	author probe;	state Exp;
branches;
next	1.15;

1.15
date	91.07.01.09.42.48;	author probe;	state Exp;
branches;
next	1.14;

1.14
date	91.06.03.01.52.52;	author probe;	state Exp;
branches;
next	1.13;

1.13
date	91.06.02.23.36.19;	author probe;	state Exp;
branches;
next	1.12;

1.12
date	91.05.28.13.44.01;	author epeisach;	state Exp;
branches;
next	1.11;

1.11
date	91.03.04.12.54.54;	author epeisach;	state Exp;
branches;
next	1.10;

1.10
date	91.02.14.16.14.29;	author probe;	state Exp;
branches;
next	1.9;

1.9
date	91.01.22.16.22.47;	author probe;	state Exp;
branches;
next	1.8;

1.8
date	90.11.16.15.59.08;	author probe;	state Exp;
branches;
next	1.7;

1.7
date	90.11.15.22.38.26;	author probe;	state Exp;
branches;
next	1.6;

1.6
date	90.11.15.20.20.23;	author probe;	state Exp;
branches;
next	1.5;

1.5
date	90.08.30.13.16.25;	author epeisach;	state Exp;
branches;
next	1.4;

1.4
date	90.07.20.15.39.17;	author probe;	state Exp;
branches;
next	1.3;

1.3
date	90.07.20.14.47.36;	author probe;	state Exp;
branches;
next	1.2;

1.2
date	90.07.17.13.00.31;	author epeisach;	state Exp;
branches;
next	1.1;

1.1
date	90.07.16.07.18.39;	author jfc;	state Exp;
branches;
next	;


desc
@File to be passed through cpp to generate a makefile.
@


1.24
log
@Need -lcompat for NetBSD.
@
text
@AnsiCC()

#ifdef _AUX_SOURCE
XSRCS = emul_re.c
XOBJS = emul_re.o
XLIBS = -lPW -lc
#endif

#if !defined(ultrix) && !defined(linux)
RPCLIB=-lrpcsvc
#endif

#if defined(__NetBSD__)
OSLIBS=-lcompat
#endif

LIBS = -lhesiod -lzephyr -lkrb -ldes $(RPCLIB) -lcom_err $(XLIBS) $(OSLIBS)

SRCS = main.c util.c attachtab.c attach.c detach.c mul.c nfs.c rvd.c\
	afs.c ufs.c rpc.c mount.c unmount.c zephyr.c getrealm.c\
	rvdutil.c pathcan.c config.c strtok.c $(XSRCS)
OBJS = 	main.o util.o attachtab.o attach.o detach.o mul.o nfs.o rvd.o\
	afs.o ufs.o rpc.o mount.o unmount.o zephyr.o getrealm.o\
	rvdutil.o pathcan.o config.o strtok.o $(XOBJS)

#if defined(sun) && defined(sparc)
attach.o: attach.c
attachtab.o: attachtab.c
nfs.o: nfs.c
mount.o: mount.c
rpc.o: rpc.c
unmount.o: unmount.c
main.o: main.c
attach.o attachtab.o main.o mount.o nfs.o rpc.o unmount.o:
	cc $(CFLAGS) -c $*.c
#endif

build_program(attach,$(OBJS),,$(LIBS))
install_program(attach,-m 4755 -o root,$(ATHRBINDIR))

install_man(attach.1,attach.1)
install_man(detach.1,detach.1)
install_man(fsid.1,fsid.1)
install_man(attach.conf.5,attach.conf.5)
install_man(attachtab.5,attachtab.5)
install_man(zinit.8,zinit.8)

install_man_links(fsid.1,nfsid.1)

install::
	$(RM) $(DESTDIR)$(ATHRBINDIR)/detach
	$(RM) $(DESTDIR)$(ATHRBINDIR)/fsid
	$(RM) $(DESTDIR)$(ATHRBINDIR)/nfsid
	$(RM) $(DESTDIR)$(ATHRBINDIR)/zinit
	$(RM) $(DESTDIR)$(ATHRETCDIR)/zinit
	ln -s attach $(DESTDIR)$(ATHRBINDIR)/detach
	ln -s attach $(DESTDIR)$(ATHRBINDIR)/fsid
	ln -s attach $(DESTDIR)$(ATHRBINDIR)/nfsid
	ln -s attach $(DESTDIR)$(ATHRBINDIR)/zinit
	ln -s $(ATHRBINDIR)/attach $(DESTDIR)$(ATHRETCDIR)/zinit
@


1.23
log
@Linux changes.
@
text
@d13 5
a17 1
LIBS = -lhesiod -lzephyr -lkrb -ldes $(RPCLIB) -lcom_err $(XLIBS)
@


1.22
log
@Moved -lzephyr ahead of -lkrb, as ld: was reporting some undefined
symbols.
@
text
@d9 1
a9 1
#if !defined(ultrix)
@


1.21
log
@Need special rule for attach.o too.
@
text
@d13 1
a13 1
LIBS = -lhesiod -lkrb -ldes $(RPCLIB) -lzephyr -lcom_err $(XLIBS)
@


1.20
log
@main.o needs to be built with cc too.
@
text
@d23 1
d30 1
a30 1
attachtab.o main.o mount.o nfs.o rpc.o unmount.o:
@


1.19
log
@nfs, mount, rpc and unmount also have to be built with special object
rule.
@
text
@d28 2
a29 1
attachtab.o mount.o nfs.o rpc.o unmount.o:
@


1.18
log
@Special rule for attachtab.o on the sun sparc because of structure
conventions
@
text
@d24 6
a29 1
	cc $(CFLAGS) -c attachtab.c
@


1.17
log
@Use AnsiCC()
@
text
@d22 4
@


1.16
log
@Install /bin/athena/zinit link
@
text
@d1 2
@


1.15
log
@Removed superfluous VAX cc entry
Changed fsid.1/nfsid.1 installation
@
text
@d37 1
d42 1
@


1.14
log
@RIOS integration
@
text
@a0 4
#ifdef vax
CC=cc
#endif

a26 1
install_man(nfsid.1,nfsid.1)
d30 2
@


1.13
log
@RIOS integration
@
text
@a14 2
BINDIR=/bin/athena

d26 1
a26 1
install_program(attach,-m 4755 -o root,$(BINDIR)/)
d37 8
a44 8
	$(RM) $(DESTDIR)$(BINDIR)/detach
	$(RM) $(DESTDIR)$(BINDIR)/fsid
	$(RM) $(DESTDIR)$(BINDIR)/nfsid
	$(RM) $(DESTDIR)/etc/athena/zinit
	ln -s attach $(DESTDIR)$(BINDIR)/detach
	ln -s attach $(DESTDIR)$(BINDIR)/fsid
	ln -s attach $(DESTDIR)$(BINDIR)/nfsid
	ln -s $(BINDIR)/attach $(DESTDIR)/etc/athena/zinit
@


1.12
log
@MAC Aux fixes for libraries.
@
text
@d4 1
a8 1
RPCLIB=-lrpcsvc
d11 2
a12 2
#if !defined(ultrix) && !define(_AUX_SOURCE)
RPCLIB=-lrpclib
@


1.11
log
@Cleaned up LIBS line to be more generic
@
text
@d7 2
d11 1
a11 1
#if !defined(ultrix) 
@


1.10
log
@Changed "rm -f" to $(RM)
@
text
@d9 4
d15 1
a15 5
#if defined(ultrix)
LIBS = -lhesiod -lkrb -ldes -lzephyr -lcom_err $(XLIBS)
#else
LIBS = -lhesiod -lkrb -ldes -lrpcsvc -lzephyr -lcom_err $(XLIBS)
#endif
@


1.9
log
@Conversion for new Imake rules
@
text
@d37 4
a40 4
	rm -f $(DESTDIR)$(BINDIR)/detach
	rm -f $(DESTDIR)$(BINDIR)/fsid
	rm -f $(DESTDIR)$(BINDIR)/nfsid
	rm -f $(DESTDIR)/etc/athena/zinit
@


1.8
log
@Install man1/fsid.1
@
text
@a0 4
#ifdef ibm032
CCFLG=-Hon=read_only_strings
CC=/bin/hc
#endif
a1 1
CCFLG=
a3 5
#if defined(AIX) && defined(i386)
CCFLG=-q
CC=cc
XLIBS=-L/usr/athena/lib -lbsd
#endif
d9 1
a9 3
AFSINC=
AFSFIL=afs.c
AFSOBJ=afs.o
a10 5
DEBUG=-O
DEFINES=

INCLUDES= $(AFSINC) $(XINCLUDES)

d12 1
a12 1
LIBS = -lhesiod -lkrb -ldes -lzephyr -lcom_err $(XLIBS) $(AFSLIB)
d14 1
a14 1
LIBS = -lhesiod -lkrb -ldes -lrpcsvc -lzephyr -lcom_err $(XLIBS) $(AFSLIB)
d17 6
a22 2
CFLAGS=$(CCFLG) $(DEFINES) $(INCLUDES) $(DEBUG)
LDFLAGS= $(DEBUG) $(LDOPTS)
a23 6
SRCS = main.c util.c attachtab.c attach.c detach.c nfs.c rvd.c\
	ufs.c rpc.c mount.c unmount.c zephyr.c getrealm.c\
	rvdutil.c pathcan.c config.c strtok.c $(AFSFIL) $(XSRCS)
OBJS = 	main.o util.o attachtab.o attach.o detach.o nfs.o rvd.o\
	ufs.o rpc.o mount.o unmount.o zephyr.o getrealm.o\
	rvdutil.o pathcan.o config.o strtok.o $(AFSOBJ) $(XOBJS)
d25 2
a26 1
all:: attach
d28 7
a34 2
clean::
	rm -f *.bak *~ *.o core \#* attach
d36 4
a39 17
attach:: $(OBJS)
	$(CC) $(LDFLAGS) -o attach $(OBJS) $(LIBS)

depend::
	@@-rm -f Make.depend
	@@-touch Make.depend
	makedepend $(SRCS) $(CFLAGS) -fMake.depend

Makefile:: Imakefile
	-mv -f Makefile Makefile.bak
	/lib/cpp -E Imakefile Makefile

install:: attach
	rm -f ${DESTDIR}/bin/athena/attach
	rm -f ${DESTDIR}/bin/athena/detach
	rm -f ${DESTDIR}/bin/athena/fsid
	rm -f ${DESTDIR}/bin/athena/nfsid
d41 4
a44 20
	rm -f ${DESTDIR}/usr/man/man1/attach.1
	rm -f ${DESTDIR}/usr/man/man1/detach.1
	rm -f ${DESTDIR}/usr/man/man1/nfsid.1
	rm -f ${DESTDIR}/usr/man/man5/attach.conf.5
	rm -f ${DESTDIR}/usr/man/man5/attachtab.5
	rm -f ${DESTDIR}/usr/man/man8/zinit.8
	install -c -m 0444 attach.1 ${DESTDIR}/usr/man/man1
	install -c -m 0444 detach.1 ${DESTDIR}/usr/man/man1
	install -c -m 0444 fsid.1 ${DESTDIR}/usr/man/man1
	install -c -m 0444 nfsid.1 ${DESTDIR}/usr/man/man1
	install -c -m 0444 attach.conf.5 ${DESTDIR}/usr/man/man5
	install -c -m 0444 attachtab.5 ${DESTDIR}/usr/man/man5
	install -c -m 0444 zinit.8 ${DESTDIR}/usr/man/man8
	install -c -s -m 4755 -o root attach ${DESTDIR}/bin/athena/attach
	ln -s attach ${DESTDIR}/bin/athena/detach
	ln -s attach ${DESTDIR}/bin/athena/fsid
	ln -s attach ${DESTDIR}/bin/athena/nfsid
	ln -s /bin/athena/attach $(DESTDIR)/etc/athena/zinit

Makefiles::
@


1.7
log
@Cleaned up AFS definitions
@
text
@d75 1
@


1.6
log
@Added /bin/athena/fsid
@
text
@a18 1
AFSDEF=-DAFS
d50 1
a50 1
	$(CC) $(LDFLAGS) -o attach $(OBJS) $(LIBS) $(AFSDEF)
d59 1
a59 1
	/lib/cpp -E Imakefile Makefile $(AFSDEF)
@


1.5
log
@Under ultrix, RVD's don't exist.
@
text
@d65 1
d82 1
@


1.4
log
@Fixed up Imakefile so it will build with AFS.
@
text
@d28 4
d33 1
@


1.3
log
@Removed ktc.o - not needed with qjb's aklog patches.
@
text
@a0 6
#ifdef AFS
AFSDEF=-DAFS
AFSINC=-Iafsinc
AFSFIL=afs.c
AFSOBJ=afs.o
#endif
d7 1
a7 1
CC=gcc
d19 5
d25 1
@


1.2
log
@Install lines and Makefiles null line
@
text
@d4 2
a5 2
AFSFIL=ktc.c afs.c
AFSOBJ=ktc.o afs.o
@


1.1
log
@Initial revision
@
text
@d40 1
a40 1
all: attach
d42 1
a42 1
clean:
d45 1
a45 1
attach: $(OBJS)
d48 1
a48 1
depend:
d53 1
a53 1
Makefile: Imakefile
d58 22
a79 2
	@@echo "Rel-eng should have put an install command here"
	@@false
@
