1997-06-17 22:56:02 +04:00
|
|
|
# $NetBSD: Makefile,v 1.12 1997/06/17 18:56:02 christos Exp $
|
1993-05-21 18:52:16 +04:00
|
|
|
# Copyright (c) 1992,1991 Carnegie Mellon University
|
|
|
|
# All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Permission to use, copy, modify and distribute this software and its
|
|
|
|
# documentation is hereby granted, provided that both the copyright
|
|
|
|
# notice and this permission notice appear in all copies of the
|
|
|
|
# software, derivative works or modified versions, and any portions
|
|
|
|
# thereof, and that both notices appear in supporting documentation.
|
|
|
|
#
|
|
|
|
# CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
|
|
|
# CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
|
|
|
# ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
|
|
|
#
|
|
|
|
# Carnegie Mellon requests users of this software to return to
|
|
|
|
#
|
|
|
|
# Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
|
|
|
# School of Computer Science
|
|
|
|
# Carnegie Mellon University
|
|
|
|
# Pittsburgh PA 15213-3890
|
|
|
|
#
|
|
|
|
# any improvements or extensions that they make and grant Carnegie the rights
|
|
|
|
# to redistribute these changes.
|
|
|
|
######################################################################
|
|
|
|
# Makefile to build sup (the client side), supfilesrv (the repository
|
|
|
|
# side, and supscan (used by the repository. If you only want to sup
|
|
|
|
# files from CMU, just build sup.
|
|
|
|
# The header files: c.h, libc.h and sysent.h are only
|
|
|
|
# necessary if you are compiling on a non-Mach system. Likewise the
|
|
|
|
# files in libextra.a are normally found in libcs.a on a Mach system.
|
|
|
|
# DOPRINT_VA is used by vprintf.c and should be defined if your version
|
|
|
|
# of libc/doprnt.c defines the routine _doprnt_va. If it defines _doprnt
|
|
|
|
# instead, leave DORPINT_VA undefined.
|
|
|
|
######################################################################
|
1993-05-24 21:57:19 +04:00
|
|
|
#
|
|
|
|
# If you need to build a sup for export outside of North America use
|
1993-05-26 00:00:47 +04:00
|
|
|
# "make EXPORTABLE_SYSTEM=true"
|
1993-05-24 21:57:19 +04:00
|
|
|
# this will remove (not use) any vestiges of crypt code that is present
|
|
|
|
# on the system.
|
|
|
|
#
|
|
|
|
# If you have crypt/crypt.c and /usr/lib/libcrypt.a, you will be building
|
|
|
|
# a system that uses the SUP crypt mechanism by default.
|
|
|
|
#
|
1996-09-05 20:50:01 +04:00
|
|
|
# If building on non 4.4BSD systems, you'll need the vis(3) and the daemon(3)
|
|
|
|
# functions from libc and libutil
|
|
|
|
|
|
|
|
#SITE = SUNOS
|
|
|
|
#SITE = SOLARIS
|
1993-05-21 18:52:16 +04:00
|
|
|
SITE = NETBSD
|
|
|
|
#SITE = CMUCS
|
1996-09-05 20:50:01 +04:00
|
|
|
|
1994-01-09 20:14:53 +03:00
|
|
|
NETBSD_DEFINES = -UMACH -DVAR_TMP -DHAS_DAEMON -DHAS_POSIX_DIR
|
1996-09-05 20:50:01 +04:00
|
|
|
SOLARIS_DEFINES = -UMACH -DVAR_TMP -DHAS_POSIX_DIR -DNEED_VSNPRINTF
|
1993-05-24 21:57:19 +04:00
|
|
|
AFS_DEFINES = -DAFS -I/usr/afsws/include
|
1993-05-24 22:57:48 +04:00
|
|
|
OSF_DEFINES = -UMACH -DOSF -D_BSD -noshrlib -g -DNEED_VSNPRINTF -DVAR_TMP
|
1996-09-05 20:50:01 +04:00
|
|
|
SUNOS_DEFINES = -UMACH -D_BSD -DNEED_VSNPRINTF -DVAR_TMP -DHAS_POSIX_DIR -DHAS_DAEMON -DNEED_DAEMON
|
1993-05-21 18:52:16 +04:00
|
|
|
CMUCS_DEFINES = -DMACH -DDOPRINT_VA -DNEED_VPRINTF
|
|
|
|
NON_MACH_DEFINES = -UMACH
|
1996-09-05 20:50:01 +04:00
|
|
|
|
1993-05-21 18:52:16 +04:00
|
|
|
|
1993-05-21 19:02:34 +04:00
|
|
|
#INSTALLATION PARAMETERS
|
|
|
|
NETBSD_BINDIR = /usr/local/sbin
|
|
|
|
NETBSD_MAN1 = /usr/local/man/man1
|
|
|
|
NETBSD_MAN8 = /usr/local/man/man8
|
|
|
|
|
1993-05-21 18:52:16 +04:00
|
|
|
CFLAGS = ${DEFS} -O -I.
|
|
|
|
|
|
|
|
SUPCL = supcmain.o supcvers.o supcparse.o supcname.o \
|
|
|
|
supcmisc.o supcmeat.o
|
1993-05-24 21:57:19 +04:00
|
|
|
SUPS = scm.o scmio.o stree.o log.o supmsg.o netcrypt.o
|
1996-09-05 20:50:01 +04:00
|
|
|
EXTRA = atoo.o errmsg.o expand.o ffilecopy.o filecopy.o \
|
|
|
|
nxtarg.o path.o quit.o run.o salloc.o skipto.o \
|
|
|
|
vprintf.o
|
1993-05-21 18:52:16 +04:00
|
|
|
|
|
|
|
|
|
|
|
PROGRAMS = sup supscan supfilesrv
|
1993-05-21 19:02:34 +04:00
|
|
|
MAN1 = sup.1
|
|
|
|
MAN8 = supservers.8
|
1993-05-21 18:52:16 +04:00
|
|
|
|
1993-05-24 21:57:19 +04:00
|
|
|
AFS_LIBPATH = /usr/afs/lib
|
|
|
|
AFS_LIBS = -L${AFS_LIBPATH}/afs -lkauth -lprot -L${AFS_LIBPATH} -lubik -lauth -lrxkad -lsys -ldes -lrx -llwp -lcmd -lcom_err -lc ${AFS_LIBPATH}/afs/util.a
|
|
|
|
|
1993-05-26 16:19:45 +04:00
|
|
|
.if exists(/usr/lib/libcrypt.a) && exists(${.CURDIR}/crypt/crypt.c) && !defined(EXPORTABLE_SYSTEM)
|
|
|
|
USE_CRYPT = yes
|
|
|
|
.endif
|
|
|
|
|
1993-06-06 01:32:15 +04:00
|
|
|
NETBSD_LIBS = -lcrypt -lutil
|
1993-05-21 18:52:16 +04:00
|
|
|
CMUCS_LIBS = -lsys
|
|
|
|
OSF_LIBS = -lbsd
|
1996-09-05 20:50:01 +04:00
|
|
|
EXTRALIBS = libextra.a
|
1993-05-21 18:52:16 +04:00
|
|
|
sup_OFILES = ${SUPCL} ${SUPS}
|
|
|
|
supfilesrv_OFILES = supfilesrv.o scan.o ${SUPS}
|
|
|
|
supfilesrv_LIBS = libextra.a
|
|
|
|
supscan_OFILES = supscan.o stree.o scan.o
|
1996-09-05 20:50:01 +04:00
|
|
|
SOLARIS_LIBS = -lsocket -lnsl
|
|
|
|
SUNOS_LIBS =
|
1993-05-21 18:52:16 +04:00
|
|
|
|
1996-09-05 20:50:01 +04:00
|
|
|
.for i in ${SITE}
|
|
|
|
DEFS = -UCMUCS -UCMU ${${i}_DEFINES}
|
|
|
|
LIBS = ${EXTRALIBS} ${${i}_LIBS}
|
|
|
|
.endfor
|
1993-05-21 18:52:16 +04:00
|
|
|
|
|
|
|
all: ${PROGRAMS}
|
1993-05-26 16:19:45 +04:00
|
|
|
.if defined(USE_CRYPT)
|
1993-05-24 21:57:19 +04:00
|
|
|
@echo "WARNING: You have built a NON-exportable version of sup because it uses crypt()!"
|
1993-05-26 00:00:47 +04:00
|
|
|
@echo " To build a crypt-clean version define EXPORTABLE_SYSTEM=true and make."
|
1993-05-24 21:57:19 +04:00
|
|
|
.endif
|
1993-05-21 18:52:16 +04:00
|
|
|
|
|
|
|
sup: ${sup_OFILES} ${LIBS}
|
1996-09-05 20:50:01 +04:00
|
|
|
${CC} ${CFLAGS} -o sup ${sup_OFILES} ${LIBS} ${LIBS}
|
1993-05-21 18:52:16 +04:00
|
|
|
|
|
|
|
supfilesrv: ${supfilesrv_OFILES} ${supfilesrv_LIBS}
|
1996-09-05 20:50:01 +04:00
|
|
|
${CC} ${CFLAGS} -o supfilesrv ${supfilesrv_OFILES} ${supfilesrv_LIBS} ${LIBS}
|
1993-05-21 18:52:16 +04:00
|
|
|
|
|
|
|
supscan: ${supscan_OFILES} ${LIBS}
|
1996-09-05 20:50:01 +04:00
|
|
|
${CC} ${CFLAGS} -o supscan ${supscan_OFILES} ${LIBS}
|
1993-05-21 18:52:16 +04:00
|
|
|
|
|
|
|
libextra.a: ${EXTRA}
|
|
|
|
ar r libextra.a $?
|
|
|
|
ranlib libextra.a
|
|
|
|
|
1993-07-13 12:12:53 +04:00
|
|
|
clean cleandir:
|
1993-05-24 21:57:19 +04:00
|
|
|
rm -f ${PROGRAMS} libextra.a netcrypt.c *.o core a.out
|
1993-05-21 18:52:16 +04:00
|
|
|
|
1993-05-21 19:02:34 +04:00
|
|
|
install: ${PROGRAMS}
|
|
|
|
install -cs -m 555 -o bin -g bin ${PROGRAMS} ${NETBSD_BINDIR}
|
|
|
|
install -c -m 444 -o bin -g bin ${MAN1} ${NETBSD_MAN1}
|
|
|
|
install -c -m 444 -o bin -g bin ${MAN8} ${NETBSD_MAN8}
|
1993-05-21 18:52:16 +04:00
|
|
|
|
1993-05-24 21:57:19 +04:00
|
|
|
netcrypt.c: crypt.diffs
|
1993-05-26 16:19:45 +04:00
|
|
|
.if defined(USE_CRYPT)
|
|
|
|
ed - crypt/crypt.c < crypt.diffs
|
|
|
|
.else
|
|
|
|
@echo "[ Using netcryptvoid.c ]"
|
|
|
|
cp netcryptvoid.c netcrypt.c
|
|
|
|
.endif
|
1993-05-24 21:57:19 +04:00
|
|
|
|
1993-05-21 18:52:16 +04:00
|
|
|
scan.o: sup.h
|
|
|
|
scm.o: sup.h
|
|
|
|
scmio.o: sup.h supmsg.h
|
|
|
|
stree.o: sup.h
|
|
|
|
supcmain.o: sup.h supmsg.h supcdefs.h
|
|
|
|
supcmeat.o: sup.h supmsg.h supcdefs.h
|
|
|
|
supcmisc.o: sup.h supmsg.h supcdefs.h
|
|
|
|
supcname.o: sup.h supmsg.h supcdefs.h
|
|
|
|
supcparse.o: sup.h supmsg.h supcdefs.h
|
|
|
|
supfilesrv.o: sup.h supmsg.h
|
|
|
|
supmsg.o: sup.h supmsg.h
|
|
|
|
supscan.o: sup.h
|
|
|
|
netcryptvoid.o: sup.h supmsg.h
|
|
|
|
netcrypt.o: sup.h supmsg.h
|