From: Petr Baudis Date: Fri, 29 Jul 2005 17:21:53 GMT Subject: [PATCH 8/2] Build commands through object files Message-ID: <20050729172153.GM21909@pasky.ji.cz> In-Reply-To: <20050729085819.GL24895@pasky.ji.cz> 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 --- commit 02074521a74483bec941ceacea35f92b485ebd48 tree b08deb01bab982b846b5757943571d0c39b9ba76 parent cd2182ac0e0635faeca6467b68decf8ab9625f4c author Petr Baudis Fri, 29 Jul 2005 19:20:28 +0200 committer Petr Baudis Fri, 29 Jul 2005 19:20:28 +0200 Makefile | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -133,13 +133,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