Skip to content

Commit

Permalink
osxkeychain: pull make config from top-level directory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed May 24, 2012
1 parent cb8ad28 commit 17a9ac7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contrib/credential/osxkeychain/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) $<
Expand Down

0 comments on commit 17a9ac7

Please sign in to comment.