summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2005-07-29 17:21:53 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-07-30 00:21:53 (GMT)
commit623c8a1460125f66274f451691b3576b0d0f7a4c (patch)
treeca233792488973eb6445ddef17a5457b78002605
parenteb3c430a85306d08ad5f1cb3d29f990041bc2457 (diff)
downloadgit-623c8a1460125f66274f451691b3576b0d0f7a4c.zip
git-623c8a1460125f66274f451691b3576b0d0f7a4c.tar.gz
git-623c8a1460125f66274f451691b3576b0d0f7a4c.tar.bz2
[PATCH] Build commands through object files
Separate the process of building the commands to compilation and linkage. This makes it more consistent with the library objects, is the traditional thing to do, and significantly speeds up the subsequent rebuilds, especially for us the people who develop git on 300MHz notebooks. Ported from Cogito. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index d7d4182..f2677be 100644
--- a/Makefile
+++ b/Makefile
@@ -137,13 +137,14 @@ CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)'
all: $(PROG)
-git-%: %.c $(LIB_FILE)
- $(CC) $(CFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
-
-git-http-pull: pull.c
-git-local-pull: pull.c
-git-ssh-pull: rsh.c pull.c
-git-ssh-push: rsh.c
+.PRECIOUS: %.o
+git-%: %.o $(LIB_FILE)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+git-http-pull: pull.o
+git-local-pull: pull.o
+git-ssh-pull: rsh.o pull.o
+git-ssh-push: rsh.o
git-http-pull: LIBS += -lcurl
git-rev-list: LIBS += -lssl