##
-## This file is part of the LinuxBIOS project.
+## This file is part of the superiotool project.
##
## Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
##
INSTALL = /usr/bin/install
PREFIX = /usr/local
-# TODO: -ansi, -pedantic
+# 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/")"'
+
CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
- -Werror-implicit-function-declaration
+ -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)
-OBJS = superiotool.o fintek.o ite.o nsc.o smsc.o
+OBJS = superiotool.o ali.o fintek.o ite.o nsc.o smsc.o winbond.o
all: $(PROGRAM)
+superiotool.o: *.c superiotool.h
+
$(PROGRAM): $(OBJS) superiotool.h
$(CC) $(CFLAGS) -o $(PROGRAM) $(OBJS)
install: $(PROGRAM)
- $(INSTALL) $(PROGRAM) $(PREFIX)/bin
+ $(INSTALL) $(PROGRAM) $(PREFIX)/sbin
+ mkdir -p $(PREFIX)/share/man/man8
+ $(INSTALL) $(PROGRAM).8 $(PREFIX)/share/man/man8
clean:
rm -f $(PROGRAM) *.o