Comments
Patch
===================================================================
@@ -29,25 +29,24 @@
SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \
| sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
-CFLAGS += -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
- -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)
-LDFLAGS += -lz
+CFLAGS ?= -O2 -Werror
+CFLAGS += -Wall -Wstrict-prototypes -Wundef -Wstrict-aliasing \
+ -Werror-implicit-function-declaration -ansi $(SVNDEF)
OBJS = superiotool.o ali.o fintek.o ite.o nsc.o nuvoton.o smsc.o winbond.o
OS_ARCH = $(shell uname)
ifeq ($(OS_ARCH), Darwin)
-LIBS = -framework IOKit -framework DirectIO -lpci -lz
+LIBS = -framework IOKit -framework DirectIO
endif
ifeq ($(OS_ARCH), FreeBSD)
-CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
- -Werror-implicit-function-declaration -ansi $(SVNDEF) \
- -I/usr/local/include
+CFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
-LIBS = -lz
+else
+CFLAGS += -pedantic
endif
ifeq ($(OS_ARCH), NetBSD)
-LDFLAGS = -l$(shell uname -p)
+LIBS = -l$(shell uname -p)
endif
# Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B).
@@ -55,7 +54,7 @@
ifeq ($(CONFIG_PCI), yes)
CFLAGS += -DPCI_SUPPORT
-LIBS += -lpci
+LIBS += -lpci -lz
OBJS += pci.o via.o
endif