]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
add install target
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 16 Sep 2008 19:09:47 +0000 (21:09 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Tue, 16 Sep 2008 19:09:47 +0000 (21:09 +0200)
Makefile

index 45340e73e3c6dd20ddd0ff5671c3ce6f92058d91..74cb1e1892f3fa7872afef911f572fb8a3a9ac81 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@
 
 MAKEFLAGS += --no-print-directory
 
+INSTALL ?= install
+PREFIX ?= /usr
 CC ?= "gcc"
 CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
 CFLAGS += -I/lib/modules/`uname -r`/build/include
@@ -32,5 +34,15 @@ iw:  $(OBJS)
 check:
        $(Q)$(MAKE) all CC="REAL_CC=$(CC) CHECK=\"sparse -Wall\" cgcc"
 
+%.gz: %
+       @$(NQ) ' GZIP' $<
+       $(Q)gzip < $< > $@
+
+install: iw iw.8.gz
+       @$(NQ) ' INST iw'
+       $(Q)$(INSTALL) -o root -g root -t $(PREFIX)/bin iw
+       @$(NQ) ' INST iw.8'
+       $(Q)$(INSTALL) -o root -g root -t $(PREFIX)/share/man/man8/ iw.8.gz
+
 clean:
-       $(Q)rm -f iw *.o *~
+       $(Q)rm -f iw *.o *~ *.gz