Patchwork superiotool Makefile patch

login
register
about
Submitter Christian Ruppert
Date 2011-01-09 21:09:30
Message ID <4D2A240A.3040802@gentoo.org>
Download mbox | patch
Permalink /patch/2496/
State New
Headers show

Comments

Christian Ruppert - 2011-01-09 21:09:30
As requested in IRC, a small patch for superiotool's Makefile has been
attached, for more details please take a look at the patch itself.

Patch

Index: Makefile
===================================================================
--- Makefile	(revision 6247)
+++ Makefile	(working copy)
@@ -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