--- mosis/Makefile.orig	Tue Aug  7 09:25:31 2001
+++ mosis/Makefile	Sat May 18 15:59:51 2002
@@ -23,6 +23,8 @@
 #
 #
 
+BINDIR = ${PREFIX}/bin
+
 ##
 ##  (1) Choosing your compiler
 ##  ---------------------------
@@ -48,10 +50,10 @@
 ##
 
 
-CC = gcc
+CC ?= gcc
 
-LIBX11 = -lX11
-XINCLUDEDIR = .
+LIBX11 = -lX11 -L${X11BASE}/lib
+XINCLUDEDIR = ${X11BASE}/include
 
 ##
 ## (2) Adding appropriate flags
@@ -88,7 +90,7 @@
 
 CHIPMUNKFLAGS = 
 
-CFLAGS = $(CHIPMUNKFLAGS) -O -I../psys/include -I$(XINCLUDEDIR)
+CFLAGS += -DBSD -DF_OK -I../psys/include -I$(XINCLUDEDIR)
 
 ##
 ## (3) Library additions
@@ -96,7 +98,7 @@
 ##
 ## on some systems, -ldl must be added to the following line
 
-OTHERLIBS= -lm
+OTHERLIBS= -lm -lcompat
 
 ##
 ##
@@ -109,7 +111,7 @@
 	$(CC) -o mosis mosis.o  $(LDFLAGS)
 
 install: mosis
-	cp mosis ../bin/mosis
+	${BSD_INSTALL_PROGRAM} mosis $(BINDIR)
 
 clean:
 	rm -f *.o mosis
