summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Uhle <thomas.uhle@mailbox.tu-dresden.de>2025-11-05 20:55:19 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-06 09:56:30 -0800
commitfade8f074e52f491808da93e4782376969309a17 (patch)
treeac5288ae96fdf2baf73f48f972c6512bc8074cd4
parent77b7284ccab768981a2cd08b6b2f164d91201e18 (diff)
wincred: align Makefile with other Makefiles in contrib
* Replace $(LOADLIBES) because it is deprecated since long and it is used nowhere else in the git project. * Use $(gitexecdir) instead of $(libexecdir) because config.mak defines $(libexecdir) as $(prefix)/libexec, not as $(prefix)/libexec/git-core. * Similar to other Makefiles, let install target rule create $(gitexecdir) to make sure the directory exists before copying the executable and also let it respect $(DESTDIR). * Shuffle the lines for the default settings to align them with the other Makefiles in contrib/credential. * Define .PHONY for all special targets (all, install, clean). Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--contrib/credential/wincred/Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
index 5b795fc9fe..d92e721e24 100644
--- a/contrib/credential/wincred/Makefile
+++ b/contrib/credential/wincred/Makefile
@@ -4,20 +4,22 @@ all:: git-credential-wincred.exe
-include ../../../config.mak.autogen
-include ../../../config.mak
-CC ?= gcc
-RM ?= rm -f
-CFLAGS ?= -O2 -Wall
-
prefix ?= /usr/local
-libexecdir ?= $(prefix)/libexec/git-core
+gitexecdir ?= $(prefix)/libexec/git-core
+CC ?= gcc
+CFLAGS ?= -O2 -Wall
INSTALL ?= install
+RM ?= rm -f
-git-credential-wincred.exe : git-credential-wincred.c
- $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
+git-credential-wincred.exe: git-credential-wincred.c
+ $(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS)
install: git-credential-wincred.exe
- $(INSTALL) -m 755 $^ $(libexecdir)
+ $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
+ $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
clean:
$(RM) git-credential-wincred.exe
+
+.PHONY: all install clean