summaryrefslogtreecommitdiff
path: root/util/viatool/Makefile
diff options
context:
space:
mode:
authorAndrey Korolyov <andrey@xdel.ru>2016-01-05 20:09:02 +0300
committerPatrick Georgi <pgeorgi@google.com>2016-01-07 15:31:35 +0100
commit0ff8f9048b104b4a01823755406fa79a590ad02f (patch)
tree4bfa79436a7e3247766e1352ee4bfa7c48a0ccc3 /util/viatool/Makefile
parent4ba946c1e1aa550b2f00db9898356cca3202323c (diff)
downloadcoreboot-0ff8f9048b104b4a01823755406fa79a590ad02f.tar.xz
viatool: add NetBSD support
Change-Id: I033044e4b781475d6d60a49a61313a720103ce38 Signed-off-by: Andrey Korolyov <andrey@xdel.ru> Reviewed-on: https://review.coreboot.org/12836 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'util/viatool/Makefile')
-rw-r--r--util/viatool/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/viatool/Makefile b/util/viatool/Makefile
index de3bfdd515..4d9d0d0ea9 100644
--- a/util/viatool/Makefile
+++ b/util/viatool/Makefile
@@ -40,6 +40,10 @@ CFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
LIBS = -lz
endif
+ifeq ($(OS_ARCH), NetBSD)
+CFLAGS += -I/usr/pkg/include
+LDFLAGS += -L/usr/pkg/lib -Wl,-rpath-link,/usr/pkg/lib -lz -lpciutils -lpci -l$(shell uname -p)
+endif
all: pciutils dep $(PROGRAM)
@@ -62,7 +66,11 @@ dep:
define LIBPCI_TEST
/* Avoid a failing test due to libpci header symbol shadowing breakage */
#define index shadow_workaround_index
+#ifdef __NetBSD__
+#include <pciutils/pci.h>
+#else
#include <pci/pci.h>
+#endif
struct pci_access *pacc;
int main(int argc, char **argv)
{