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>
This commit is contained in:
parent
de45c59080
commit
decefea272
|
@ -43,7 +43,9 @@ LDFLAGS += -L/usr/local/lib
|
||||||
LIBS = -lz
|
LIBS = -lz
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS_ARCH), NetBSD)
|
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
|
endif
|
||||||
|
|
||||||
# Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B).
|
# Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B).
|
||||||
|
@ -51,8 +53,11 @@ CONFIG_PCI = yes
|
||||||
|
|
||||||
ifeq ($(CONFIG_PCI), yes)
|
ifeq ($(CONFIG_PCI), yes)
|
||||||
CFLAGS += -DPCI_SUPPORT
|
CFLAGS += -DPCI_SUPPORT
|
||||||
LIBS += -lpci
|
|
||||||
OBJS += pci.o via.o amd.o
|
OBJS += pci.o via.o amd.o
|
||||||
|
LIBS += -lpci
|
||||||
|
ifeq ($(OS_ARCH),NetBSD)
|
||||||
|
LIBS += -lpciutils
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(PROGRAM)
|
all: $(PROGRAM)
|
||||||
|
|
|
@ -34,7 +34,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCI_SUPPORT
|
#ifdef PCI_SUPPORT
|
||||||
|
# ifdef __NetBSD__
|
||||||
|
#include <pciutils/pci.h>
|
||||||
|
# else
|
||||||
#include <pci/pci.h>
|
#include <pci/pci.h>
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
|
|
Loading…
Reference in New Issue