aboutsummaryrefslogtreecommitdiff
path: root/contrib/credential
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-23 13:36:53 -0400
committerJunio C Hamano <gitster@pobox.com>2012-05-24 10:35:40 -0700
commit17a9ac7d6b5f27eb5f8efee324e88db2b6ec9bd6 (patch)
treebfcd91acf96edd78683466918f10758b3321bc94 /contrib/credential
parentcb8ad289c6b3f774e6e4431a08eb585eadbb8dad (diff)
downloadgit-17a9ac7d6b5f27eb5f8efee324e88db2b6ec9bd6.tar.gz
git-17a9ac7d6b5f27eb5f8efee324e88db2b6ec9bd6.tar.xz
osxkeychain: pull make config from top-level directory
The default compiler and cflags were mostly "works for me" when I built the original version. We need to be much less careful here than usual, because we know we are building only on OS X. But it's only polite to at least respect the CFLAGS and CC definitions that the user may have provided earlier. While we're at it, let's update our definitions and rules to be more like the top-level Makefile; default our CFLAGS to include -O2, and make sure we use CFLAGS and LDFLAGS when linking. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/credential')
-rw-r--r--contrib/credential/osxkeychain/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile
index 75c07f8be..4b3a08a2b 100644
--- a/contrib/credential/osxkeychain/Makefile
+++ b/contrib/credential/osxkeychain/Makefile
@@ -2,10 +2,13 @@ all:: git-credential-osxkeychain
CC = gcc
RM = rm -f
-CFLAGS = -g -Wall
+CFLAGS = -g -O2 -Wall
+
+-include ../../../config.mak.autogen
+-include ../../../config.mak
git-credential-osxkeychain: git-credential-osxkeychain.o
- $(CC) -o $@ $< -Wl,-framework -Wl,Security
+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -Wl,-framework -Wl,Security
git-credential-osxkeychain.o: git-credential-osxkeychain.c
$(CC) -c $(CFLAGS) $<