$NetBSD: patch-samterm_Makefile,v 1.1 2017/09/21 14:37:40 bsiegert Exp $

--- samterm/Makefile.orig	2017-09-21 13:54:42.000000000 +0000
+++ samterm/Makefile
@@ -1,31 +1,35 @@
 #	Copyright (c) 1992 AT&T - All rights reserved.
 #
-#	Prototype Makefile for samterm
+#	Prototype BSDi Makefile for samterm
+#	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
 
 #	SAMTERM contains the name of the file containing the samterm
 #	executable.  SAMTERMDIR is the directory where it is installed.
 SAMTERM=samterm
-SAMTERMDIR=/v/bin
+SAMTERMDIR=$(PREFIX)/bin
 
 #	set this if your X libraries are in different locations
 #	or if you need extra libraries to load with X11 applications
-XLIBS=/usr/local/X11R5/lib/libXt.a /usr/local/X11R5/lib/libX11.a
+#XLIBS= /usr/X11R6/lib/libXt.a \
+#      /usr/X11R6/lib/libSM.a \
+#      /usr/X11R6/lib/libICE.a \
+#      /usr/X11R6/lib/libX11.a
+
+XLIBS=-L${X11BASE}/lib -Wl,-R${X11BASE}/lib -lXt -lSM -lICE -lX11
 
 CFLAGS=$(OS) $(INCS) -D_LIBXG_EXTENSION
 
-LIBS=../libframe/libframe.a ../libXg/libXg.a
+LIBS=../libframe/libframe.a ../libXg/libXg.a 
 CC=cc
 
 OBJ=main.o flayer.o icons.o io.o menu.o mesg.o rasp.o scroll.o unix.o
