$OpenBSD$

Don't hardcode optimizations, install to the correct locations.
Disable warnings; clang is very chatty.
Put in obstack code.

Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -3,15 +3,15 @@ VPATH = $(srcdir)
 else
 srcdir=$(shell pwd)
 endif
-CFLAGS = -O2 -g
+CFLAGS ?= -O2 -g
 DWZ_VERSION := $(shell cat $(srcdir)/VERSION)
-override CFLAGS += -Wall -W -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"$(DWZ_VERSION)"'
-prefix = /usr
+override CFLAGS += -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"$(DWZ_VERSION)"'
+prefix ?= /usr/local
 exec_prefix = $(prefix)
 bindir = $(exec_prefix)/bin
 datarootdir = $(prefix)/share
-mandir = $(datarootdir)/man
-OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o
+mandir = $(prefix)/man
+OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o obstack.o
 dwz: $(OBJECTS)
 	$(CC) $(LDFLAGS) -o $@ $^ -lelf
 install: dwz
@@ -51,7 +51,7 @@ DWZ_TEST_SOURCES := $(patsubst %.o,%-for-test.c,$(OBJE
 	sed 's/__GNUC__/NOT_DEFINED/' $< > $@
 
 dwz-for-test: $(DWZ_TEST_SOURCES)
-	$(CC) $(DWZ_TEST_SOURCES) -O2 -g -lelf -o $@ -Wall -W -DDEVEL \
+	$(CC) $(DWZ_TEST_SOURCES) -O2 -g -lelf -o $@ -DDEVEL \
 	  -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"for-test"' -I$(srcdir)
 
 min:
