diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-24 13:48:04 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-24 13:48:04 -0700 |
| commit | 42737585fa9d970e668a92574196bef1822e4db4 (patch) | |
| tree | 9404576fa9302eab07ec95f20fa4d4b8f89888e5 | |
| parent | Merge branch 'jk/status-z-short-fix' (diff) | |
| parent | contrib/credential: harmonize Makefiles (diff) | |
| download | git-42737585fa9d970e668a92574196bef1822e4db4.tar.gz git-42737585fa9d970e668a92574196bef1822e4db4.zip | |
Merge branch 'tu/credential-makefile-updates'
Build procedure for a few credential helpers (in contrib/) have
been updated.
* tu/credential-makefile-updates:
contrib/credential: harmonize Makefiles
Diffstat (limited to '')
| -rw-r--r-- | contrib/credential/libsecret/Makefile | 29 | ||||
| -rw-r--r-- | contrib/credential/osxkeychain/Makefile | 21 |
2 files changed, 27 insertions, 23 deletions
diff --git a/contrib/credential/libsecret/Makefile b/contrib/credential/libsecret/Makefile index 97ce9c92fb..7cacc57681 100644 --- a/contrib/credential/libsecret/Makefile +++ b/contrib/credential/libsecret/Makefile @@ -1,28 +1,27 @@ # The default target of this Makefile is... -all:: - -MAIN:=git-credential-libsecret -all:: $(MAIN) - -CC = gcc -RM = rm -f -CFLAGS = -g -O2 -Wall -PKG_CONFIG = pkg-config +all:: git-credential-libsecret -include ../../../config.mak.autogen -include ../../../config.mak +prefix ?= /usr/local +gitexecdir ?= $(prefix)/libexec/git-core + +CC ?= gcc +CFLAGS ?= -g -O2 -Wall +PKG_CONFIG ?= pkg-config +RM ?= rm -f + INCS:=$(shell $(PKG_CONFIG) --cflags libsecret-1 glib-2.0) LIBS:=$(shell $(PKG_CONFIG) --libs libsecret-1 glib-2.0) -SRCS:=$(MAIN).c -OBJS:=$(SRCS:.c=.o) - %.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -o $@ -c $< -$(MAIN): $(OBJS) - $(CC) -o $@ $(LDFLAGS) $^ $(LIBS) +git-credential-libsecret: git-credential-libsecret.o + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) clean: - @$(RM) $(MAIN) $(OBJS) + $(RM) git-credential-libsecret git-credential-libsecret.o + +.PHONY: all clean diff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile index 0948297e20..c7d9121022 100644 --- a/contrib/credential/osxkeychain/Makefile +++ b/contrib/credential/osxkeychain/Makefile @@ -1,19 +1,24 @@ # The default target of this Makefile is... all:: git-credential-osxkeychain -CC = gcc -RM = rm -f -CFLAGS = -g -O2 -Wall - -include ../../../config.mak.autogen -include ../../../config.mak +prefix ?= /usr/local +gitexecdir ?= $(prefix)/libexec/git-core + +CC ?= gcc +CFLAGS ?= -g -O2 -Wall +RM ?= rm -f + +%.o: %.c + $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< + git-credential-osxkeychain: git-credential-osxkeychain.o - $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) \ + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \ -framework Security -framework CoreFoundation -git-credential-osxkeychain.o: git-credential-osxkeychain.c - $(CC) -c $(CFLAGS) $< - clean: $(RM) git-credential-osxkeychain git-credential-osxkeychain.o + +.PHONY: all clean |
