summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-06-13 08:28:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-06-13 09:02:10 (GMT)
commit334d28ae606c2d007803594cfc20d9e7997c0543 (patch)
tree6fde7278d37e1b26af83c228f541310b76737c50 /Makefile
parent48dd1da8e190c435de692c0cfff5a8f6eacedbe5 (diff)
downloadgit-334d28ae606c2d007803594cfc20d9e7997c0543.zip
git-334d28ae606c2d007803594cfc20d9e7997c0543.tar.gz
git-334d28ae606c2d007803594cfc20d9e7997c0543.tar.bz2
Makefile: allow generating git.o for debugging purposes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 392a5c4..a70277b 100644
--- a/Makefile
+++ b/Makefile
@@ -735,9 +735,13 @@ gitk-wish: gitk GIT-GUI-VARS
chmod +x $@+ && \
mv -f $@+ $@
-git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS
+git.o: git.c common-cmds.h GIT-CFLAGS
+ $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
+ $(ALL_CFLAGS) -c $(filter %.c,$^)
+
+git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(QUIET_LINK)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
- $(ALL_CFLAGS) -o $@ $(filter %.c,$^) \
+ $(ALL_CFLAGS) -o $@ $(filter %.c,$^) git.o \
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
help.o: common-cmds.h