summaryrefslogtreecommitdiff
path: root/util/superiotool/Makefile
diff options
context:
space:
mode:
authorAndrey Korolyov <andrey@xdel.ru>2016-01-04 02:20:04 +0300
committerMartin Roth <martinroth@google.com>2016-01-26 04:47:25 +0100
commitdecefea2729cb691d06f4c68c0c0d60c039d389f (patch)
treeaeb5d5f599c4a6a5b6cb1eec9adf440997313740 /util/superiotool/Makefile
parentde45c590808184be24b5f9d271b93740da7c0976 (diff)
downloadcoreboot-decefea2729cb691d06f4c68c0c0d60c039d389f.tar.xz
superiotool: fix out-of-box NetBSD Makefile support
Add NetBSD-specific locations under pkg/ and missing linker flag for libpciutils. Change-Id: I812817a374aaba561b28d8a22f20d238c9dca32b Signed-off-by: Andrey Korolyov <andrey@xdel.ru> Reviewed-on: https://review.coreboot.org/12830 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/superiotool/Makefile')
-rw-r--r--util/superiotool/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile
index cf487dc81b..1cd098f55d 100644
--- a/util/superiotool/Makefile
+++ b/util/superiotool/Makefile
@@ -43,7 +43,9 @@ LDFLAGS += -L/usr/local/lib
LIBS = -lz
endif
ifeq ($(OS_ARCH), NetBSD)
-LDFLAGS = -l$(shell uname -p)
+CFLAGS += -I/usr/pkg/include
+LDFLAGS += -L/usr/pkg/lib -Wl,-rpath-link,/usr/pkg/lib
+LIBS = -lz -l$(shell uname -p)
endif
# Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B).
@@ -51,8 +53,11 @@ CONFIG_PCI = yes
ifeq ($(CONFIG_PCI), yes)
CFLAGS += -DPCI_SUPPORT
-LIBS += -lpci
OBJS += pci.o via.o amd.o
+LIBS += -lpci
+ifeq ($(OS_ARCH),NetBSD)
+LIBS += -lpciutils
+endif
endif
all: $(PROGRAM)