--- Makefile.orig	Thu Jan 22 06:28:32 1998
+++ Makefile	Sat Oct  3 20:42:02 1998
@@ -2,11 +2,14 @@
 # If you're not using background pixmaps, remove -lXpm from the LIBS.
 # If your X libraries are somewhere other than /usr/X11/lib, give their
 # location here.
-LIBS	=  -L/usr/X11/lib -lXpm -lXext -lX11 -lXmu -lm
+LIBS	=  -L$(X11BASE)/lib -lXpm -lXext -lX11 -lXmu -lm
+.if $(PORTOBJFORMAT) == "elf"
+LIBS	+= -Wl,-rpath,$(X11BASE)/lib
+.endif
 
 CC	= gcc
 CCC	= gcc
-CFLAGS	= -g -O2
+CFLAGS	+= -I$(X11BASE)/include
 OBJECTS	= Border.o Buttons.o Channel.o Client.o Events.o Main.o Manager.o Menu.o Rotated.o
 
 .c.o:
@@ -16,7 +19,7 @@
 	$(CCC) -c $(CFLAGS) $<
 
 wmx:	$(OBJECTS)
-	mv -f wmx wmx.old >& /dev/null || true
+	-mv -f wmx wmx.old 2>/dev/null
 	$(CCC) -o wmx $(OBJECTS) $(LIBS)
 
 depend:
