--- Makefile.Makefile_cleanup 2008-03-17 16:43:48.000000000 +0300 +++ Makefile 2008-05-18 12:10:51.000000000 +0400 @@ -22,14 +22,14 @@ CC = gcc INSTALL = /usr/bin/install -PREFIX = /usr/local +PREFIX ?= /usr/local # 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 \ +CFLAGS ?= -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \ -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF) OBJS = superiotool.o ali.o fintek.o ite.o nsc.o smsc.o winbond.o @@ -42,9 +42,8 @@ $(CC) $(CFLAGS) -o $(PROGRAM) $(OBJS) install: $(PROGRAM) - $(INSTALL) $(PROGRAM) $(PREFIX)/sbin - mkdir -p $(PREFIX)/share/man/man8 - $(INSTALL) $(PROGRAM).8 $(PREFIX)/share/man/man8 + $(INSTALL) -p -D $(PROGRAM) $(PREFIX)/sbin/$(PROGRAM) + $(INSTALL) -p -D -m 644 $(PROGRAM).8 $(PREFIX)/share/man/man8/$(PROGRAM).8 clean: rm -f $(PROGRAM) *.o