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>

Thomas Uhle committed Nov 5, 2025 at 20:55 UTC fade8f074e52f491808da93e4782376969309a17
1 file changed +10 -8
contrib/credential/wincred/Makefile
+10 -8
@@ -4,20 +4,22 @@ all:: git-credential-wincred.exe
4 -include ../../../config.mak.autogen
5 -include ../../../config.mak
6
7 -CC ?= gcc
8 -RM ?= rm -f
9 -CFLAGS ?= -O2 -Wall
10 -
7 prefix ?= /usr/local
12 -libexecdir ?= $(prefix)/libexec/git-core
8 +gitexecdir ?= $(prefix)/libexec/git-core
9
10 +CC ?= gcc
11 +CFLAGS ?= -O2 -Wall
12 INSTALL ?= install
13 +RM ?= rm -f
14
16 -git-credential-wincred.exe : git-credential-wincred.c
17 - $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
15 +git-credential-wincred.exe: git-credential-wincred.c
16 + $(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS)
17
18 install: git-credential-wincred.exe
20 - $(INSTALL) -m 755 $^ $(libexecdir)
19 + $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
20 + $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
21
22 clean:
23 $(RM) git-credential-wincred.exe
24 +
25 +.PHONY: all install clean