$OpenBSD: patch-src_Makefile,v 1.2 2017/02/27 15:47:17 jca Exp $
--- src/Makefile.orig	Sat Sep 17 22:30:02 2011
+++ src/Makefile	Mon Feb 27 16:46:09 2017
@@ -7,10 +7,10 @@ RM	= rm -f
 INSTALL	= install
 LN	= ln
 
-LIBXDIR	= /usr/local/libexec/
-BINDIR	= /usr/local/bin/
+LIBXDIR	= $(PREFIX)/libexec/
+BINDIR	= $(PREFIX)/bin/
 
-CXXFLAGS= -pipe -Wall -Wextra -O2 -g
+CXXFLAGS= -Wall -Wextra $(PORTS_CXXFLAGS)
 LDFLAGS	= 
 
 OBJS	= owx.o cli.o throw.o cmds.o wouxun.o comm.o file.o csv.o export.o import.o util.o
@@ -33,11 +33,11 @@ install: all
 	$(INSTALL) -d $(LIBXDIR)
 	$(INSTALL) -m 755 $(NAME) $(LIBXDIR)
 	$(INSTALL) -d $(BINDIR)
-	$(LN) -f -s $(LIBXDIR)$(NAME) $(BINDIR)$(NAME)-check
-	$(LN) -f -s $(LIBXDIR)$(NAME) $(BINDIR)$(NAME)-get
-	$(LN) -f -s $(LIBXDIR)$(NAME) $(BINDIR)$(NAME)-put
-	$(LN) -f -s $(LIBXDIR)$(NAME) $(BINDIR)$(NAME)-export
-	$(LN) -f -s $(LIBXDIR)$(NAME) $(BINDIR)$(NAME)-import
+	$(LN) -f -s $(TRUEPREFIX)/libexec/$(NAME) $(BINDIR)$(NAME)-check
+	$(LN) -f -s $(TRUEPREFIX)/libexec/$(NAME) $(BINDIR)$(NAME)-get
+	$(LN) -f -s $(TRUEPREFIX)/libexec/$(NAME) $(BINDIR)$(NAME)-put
+	$(LN) -f -s $(TRUEPREFIX)/libexec/$(NAME) $(BINDIR)$(NAME)-export
+	$(LN) -f -s $(TRUEPREFIX)/libexec/$(NAME) $(BINDIR)$(NAME)-import
 
 .PHONY: clean
 clean:
