wincred: avoid overwriting configured variables
[gitweb.git] / contrib / credential / wincred / Makefile
index bad45ca47a2379a9226da1ae886e23dff01ca8f4..6e992c08667d0b2b6a3c2d42314e3f500eb7502a 100644 (file)
@@ -1,14 +1,22 @@
 all: git-credential-wincred.exe
 
-CC = gcc
-RM = rm -f
-CFLAGS = -O2 -Wall
-
 -include ../../../config.mak.autogen
 -include ../../../config.mak
 
+CC ?= gcc
+RM ?= rm -f
+CFLAGS ?= -O2 -Wall
+
+prefix ?= /usr/local
+libexecdir ?= $(prefix)/libexec/git-core
+
+INSTALL ?= install
+
 git-credential-wincred.exe : git-credential-wincred.c
        $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
 
+install: git-credential-wincred.exe
+       $(INSTALL) -m 755 $^ $(libexecdir)
+
 clean:
        $(RM) git-credential-wincred.exe