]> git.tuebingen.mpg.de Git - adu.git/blobdiff - Makefile
Set CC to gcc by default.
[adu.git] / Makefile
index a0404789cd1bfebf98cecf7e47b05c57ab155072..c61dff74c58533953951f105aaec1ce4c7965496 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,11 @@ CPPFLAGS += -I/usr/local/include
 
 LDFLAGS += -L/usr/local/lib
 
+PREFIX ?= /usr/local
+ifeq "$(origin CC)" "default"
+       CC := gcc
+endif
+
 
 ifeq (,$(findstring BSD,$(uname_S)))
        CPPFLAGS += -D_LARGEFILE64_SOURCE
@@ -31,7 +36,7 @@ endif
 
 
 Makefile.deps: $(wildcard *.c *.h)
-       gcc -MM -MG *.c > $@
+       $(CC) -MM -MG *.c > $@
 
 -include Makefile.deps
 
@@ -82,3 +87,7 @@ index.html: adu.1.html index.html.in INSTALL README
        sed -e '1,/@INSTALL@/d' -e '/@MAN_PAGE@/,$$d' index.html.in >> $@
        sed -e '1,/Return to Main Contents/d' -e '/Index/,$$d' adu.1.html >> $@
        sed -e '1,/@MAN_PAGE@/d' index.html.in >> $@
+
+install: adu adu.1
+       install -s adu $(PREFIX)/bin
+       install -m 0644 adu.1 $(PREFIX)/man/man1