From 0ff8f9048b104b4a01823755406fa79a590ad02f Mon Sep 17 00:00:00 2001 From: Andrey Korolyov Date: Tue, 5 Jan 2016 20:09:02 +0300 Subject: viatool: add NetBSD support Change-Id: I033044e4b781475d6d60a49a61313a720103ce38 Signed-off-by: Andrey Korolyov Reviewed-on: https://review.coreboot.org/12836 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc --- util/viatool/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util/viatool/Makefile') 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 +#else #include +#endif struct pci_access *pacc; int main(int argc, char **argv) { -- cgit v1.2.3