$OpenBSD: patch-Makefile,v 1.4 2016/03/23 20:25:52 naddy Exp $
--- Makefile.orig	Mon Mar  1 12:01:17 1999
+++ Makefile	Fri Mar 18 23:48:28 2016
@@ -1,24 +1,21 @@
-RADIOCARD = 	ZOLTRIX # Can be RADIOTRACK, ZOLTRIX, KERNEL
-INCDIR	=	-I/usr/X11R6/include
-LIBDIR	=	-L/usr/X11R6/lib
+CFLAGS+=	-I${X11BASE}/include
+LIBDIR	=	-L${X11BASE}/lib
 LIBS	=	-lXpm -lXext -lX11
-OBJS	=	src/wmtune.o \
-			src/wmgeneral/wmgeneral.o \
+OBJS	=	src/wmtune.o src/wmgeneral/wmgeneral.o
 
-.c.o:
-	cc -c -O2 -Wall -D$(shell echo `uname -s`) $< -o $*.o $(INCDIR) -D$(RADIOCARD)
-
 all: wmtune
 
+.c.o:
+	$(CC) $(CFLAGS) -c $< -o $@
+
 wmtune: $(OBJS)
-	cc -o wmtune $^ $(LIBDIR) $(LIBS)
+	$(CC) -o wmtune $(OBJS) $(LIBDIR) $(LIBS)
 
 install:: all
-	install -s -m 4755 -o root wmtune /usr/X11R6/bin
-	install -m 0644 -o root -g root sample.wmtunerc /etc/wmtunerc
+	${BSD_INSTALL_PROGRAM} wmtune ${PREFIX}/bin
+	${BSD_INSTALL_MAN} wmtune.1 ${PREFIX}/man/man1
+	${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/examples/wmtune
+	${BSD_INSTALL_DATA} sample.wmtunerc ${PREFIX}/share/examples/wmtune
 
 clean:
-	for i in $(OBJS) ; do \
-		rm -f $$i; \
-	done
-	rm -f wmtune
+	rm -f $(OBJS) wmtune
