$NetBSD: patch-sam_Makefile,v 1.2 2022/12/15 12:14:17 jperkin Exp $ --- sam/Makefile.orig 2017-09-21 13:54:42.000000000 +0000 +++ sam/Makefile @@ -1,18 +1,17 @@ # Copyright (c) 1992 AT&T - All rights reserved. # -# Prototype Makefile for sam +# Prototype BSDi Makefile for sam +# Courtesy of Boyd Roberts +# +# Define operating system type: -DBSDi # -# define operating system. ONE of: -# -DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1 -# -DHPUX -DAPOLLO -DCONVEX -DDYNIX -# # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified # if your compiler supports posix-compatible compilation -OS=-DIRIX -ansiposix +OS=-DBSDi -O2 # add -Iincludedir for any include directories that need to be searched # for posix header files (for UMIPS, add -I/usr/include/posix) -INCS=-I../include +INCS=-I../include -I/usr/include/posix # Set the name of the environment variable containing the user's home directory HOMEDIR=HOME @@ -22,12 +21,12 @@ HOMEDIR=HOME # where sam is to be installed. SAMSAVEDIR is the name of the directory # where the samsave file restoration script is stored. RSAMNAME=sam -TERMNAME=/v/bin/samterm -SAMDIR=/usr/bin -SAMSAVEDIR=/v/bin +TERMNAME=$(PREFIX)/bin/samterm +SAMDIR=$(PREFIX)/bin +SAMSAVEDIR=$(PREFIX)/bin # Set TMP to a good place for tmp files (with lots of room) -TMP=/usr/tmp +TMP=/var/tmp # Set SHELLNAME and SHELLPATH to the name of a shell and the pathname # of its executable @@ -37,7 +36,7 @@ SHELLPATH=/bin/sh # Set RXNAME and RXPATHNAME to the name of the remote execution command # and the pathname of its executable RXNAME=rsh -RXPATHNAME=/usr/bsd/rsh +RXPATHNAME=/usr/bin/rsh SAMSAVE=/bin/sh\\n$(SAMSAVEDIR)/samsave @@ -68,9 +67,10 @@ nuke: clean rm -f sam install: sam - cp sam $(SAMDIR)/$(RSAMNAME) - cp samsave $(SAMSAVEDIR)/samsave - chmod +x samsave + $(BSD_INSTALL) -c sam $(SAMDIR)/$(RSAMNAME) + $(BSD_INSTALL) -c samsave $(SAMSAVEDIR)/samsave + $(BSD_INSTALL) -c B.sh $(SAMDIR)/B + chmod +x $(SAMSAVEDIR)/samsave $(OBJ): sam.h ../include/u.h ../include/libc.h errors.h mesg.h