Update support for FreeBSD.

Signed-off-by: Idwer Vollering <[email protected]>

---

FreeBSD support already existed but doesn't compile without errors on my
fbsd 8.1 machine:

$ gmake
gcc -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing
-Werror-implicit-function-declaration -ansi -pedantic
-D'SUPERIOTOOL_VERSION="5728"' -DPCI_SUPPORT   -c -o superiotool.o
superiotool.c
In file included from superiotool.c:24:
superiotool.h:41:21: error: pci/pci.h: No such file or directory
superiotool.c: In function 'main':
superiotool.c:302: error: implicit declaration of function 'pci_alloc'
cc1: warnings being treated as errors
superiotool.c:302: warning: assignment makes pointer from integer without a
cast
superiotool.c:303: error: implicit declaration of function 'pci_init'
superiotool.c:304: error: implicit declaration of function 'pci_scan_bus'
gmake: *** [superiotool.o] Error 1
Index: Makefile
===================================================================
--- Makefile	(revision 5954)
+++ Makefile	(working copy)
@@ -39,6 +39,13 @@
 ifeq ($(OS_ARCH), Darwin)
 LIBS = -framework IOKit -framework DirectIO -lpci -lz
 endif
+ifeq ($(OS_ARCH), FreeBSD)
+CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
+         -Werror-implicit-function-declaration $(SVNDEF) \
+         -I/usr/local/include
+LDFLAGS += -L/usr/local/lib
+LIBS = -lz
+endif
 
 # Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B).
 CONFIG_PCI = yes
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to