aboutsummaryrefslogtreecommitdiff
path: root/util/inteltool/Makefile
diff options
context:
space:
mode:
authorAndrey Korolyov <andrey@xdel.ru>2016-01-05 19:59:06 +0300
committerPatrick Georgi <pgeorgi@google.com>2016-01-07 15:33:13 +0100
commit046d2174207d79681fe98206ce92074ac610957e (patch)
tree7cdad9ed59ff9ccc35a709bb25085e4ef544d015 /util/inteltool/Makefile
parent0ff8f9048b104b4a01823755406fa79a590ad02f (diff)
inteltool: add NetBSD compatibility
Tested on NetBSD-7.0/i386 Change-Id: I6a693633d3a80ea07ade233b1b4fd1c5a1412032 Signed-off-by: Andrey Korolyov <andrey@xdel.ru> Reviewed-on: https://review.coreboot.org/12835 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/inteltool/Makefile')
-rw-r--r--util/inteltool/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile
index 6e202cf81f..eec1ad766f 100644
--- a/util/inteltool/Makefile
+++ b/util/inteltool/Makefile
@@ -34,6 +34,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)
@@ -52,7 +56,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)
{