47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
|
--- a/superiotool/Makefile
|
||
|
+++ b/superiotool/Makefile
|
||
|
@@ -26,12 +26,10 @@
|
||
|
|
||
|
# Set the superiotool version string from the highest revision number
|
||
|
# of the checked out superiotool files.
|
||
|
-SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \
|
||
|
- | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
|
||
|
+SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell basename `cd ..;pwd`|cut -c17-)"'
|
||
|
|
||
|
CFLAGS += -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
|
||
|
- -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)
|
||
|
-LDFLAGS += -lz
|
||
|
+ -Werror-implicit-function-declaration -ansi -pedantic
|
||
|
|
||
|
OBJS = superiotool.o ali.o fintek.o ite.o nsc.o nuvoton.o smsc.o winbond.o
|
||
|
|
||
|
@@ -41,10 +39,9 @@
|
||
|
endif
|
||
|
ifeq ($(OS_ARCH), FreeBSD)
|
||
|
CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
|
||
|
- -Werror-implicit-function-declaration -ansi $(SVNDEF) \
|
||
|
+ -Werror-implicit-function-declaration -ansi \
|
||
|
-I/usr/local/include
|
||
|
LDFLAGS += -L/usr/local/lib
|
||
|
-LIBS = -lz
|
||
|
endif
|
||
|
ifeq ($(OS_ARCH), NetBSD)
|
||
|
LDFLAGS = -l$(shell uname -p)
|
||
|
@@ -55,6 +52,7 @@
|
||
|
|
||
|
ifeq ($(CONFIG_PCI), yes)
|
||
|
CFLAGS += -DPCI_SUPPORT
|
||
|
+LIBS += -lz
|
||
|
LIBS += -lpci
|
||
|
OBJS += pci.o via.o
|
||
|
endif
|
||
|
@@ -75,5 +73,8 @@
|
||
|
clean:
|
||
|
rm -f $(PROGRAM) *.o
|
||
|
|
||
|
+%.o: %.c
|
||
|
+ $(CC) $(CFLAGS) $(SVNDEF) -c $< -o $@
|
||
|
+
|
||
|
.PHONY: all install clean
|
||
|
|