Git fork

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

+27 -23
+14 -15
contrib/credential/libsecret/Makefile
··· 1 1 # The default target of this Makefile is... 2 - all:: 2 + all:: git-credential-libsecret 3 3 4 - MAIN:=git-credential-libsecret 5 - all:: $(MAIN) 4 + -include ../../../config.mak.autogen 5 + -include ../../../config.mak 6 6 7 - CC = gcc 8 - RM = rm -f 9 - CFLAGS = -g -O2 -Wall 10 - PKG_CONFIG = pkg-config 7 + prefix ?= /usr/local 8 + gitexecdir ?= $(prefix)/libexec/git-core 11 9 12 - -include ../../../config.mak.autogen 13 - -include ../../../config.mak 10 + CC ?= gcc 11 + CFLAGS ?= -g -O2 -Wall 12 + PKG_CONFIG ?= pkg-config 13 + RM ?= rm -f 14 14 15 15 INCS:=$(shell $(PKG_CONFIG) --cflags libsecret-1 glib-2.0) 16 16 LIBS:=$(shell $(PKG_CONFIG) --libs libsecret-1 glib-2.0) 17 17 18 - SRCS:=$(MAIN).c 19 - OBJS:=$(SRCS:.c=.o) 20 - 21 18 %.o: %.c 22 19 $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -o $@ -c $< 23 20 24 - $(MAIN): $(OBJS) 25 - $(CC) -o $@ $(LDFLAGS) $^ $(LIBS) 21 + git-credential-libsecret: git-credential-libsecret.o 22 + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) 26 23 27 24 clean: 28 - @$(RM) $(MAIN) $(OBJS) 25 + $(RM) git-credential-libsecret git-credential-libsecret.o 26 + 27 + .PHONY: all clean
+13 -8
contrib/credential/osxkeychain/Makefile
··· 1 1 # The default target of this Makefile is... 2 2 all:: git-credential-osxkeychain 3 3 4 - CC = gcc 5 - RM = rm -f 6 - CFLAGS = -g -O2 -Wall 7 - 8 4 -include ../../../config.mak.autogen 9 5 -include ../../../config.mak 10 6 7 + prefix ?= /usr/local 8 + gitexecdir ?= $(prefix)/libexec/git-core 9 + 10 + CC ?= gcc 11 + CFLAGS ?= -g -O2 -Wall 12 + RM ?= rm -f 13 + 14 + %.o: %.c 15 + $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< 16 + 11 17 git-credential-osxkeychain: git-credential-osxkeychain.o 12 - $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) \ 18 + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \ 13 19 -framework Security -framework CoreFoundation 14 20 15 - git-credential-osxkeychain.o: git-credential-osxkeychain.c 16 - $(CC) -c $(CFLAGS) $< 17 - 18 21 clean: 19 22 $(RM) git-credential-osxkeychain git-credential-osxkeychain.o 23 + 24 + .PHONY: all clean