Subject: [PATCH] Simplify building of programs

From: Jonas Fonseca <[email-masked]>
Date: Sun, 24 Apr 2005 01:59:56 +0200

Don't list libgit.a twice when compiling programs and make them depend
on the .c files so .o files are not left behind.

Signed-off-by: Jonas Fonseca <[email-masked]>

--- 66b3fa5bde838935121a2eb7cf4b67587c32de13/Makefile  (mode:100644 sha1:e26b7c3695bf7ee88a75dcb6fd1953ce8b33c748)
+++ uncommitted/Makefile  (mode:100644)
@@ -49,8 +49,7 @@
 LIB_H=cache.h object.h

-LIBS = $(LIB_FILE)
-LIBS += -lz
+LIBS = -lz
 
 ifdef MOZILLA_SHA1
 	SHA1_HEADER="mozilla-sha1/sha1.h"
@@ -70,7 +69,7 @@
 
 all: $(PROG) $(GEN_SCRIPT)
 
-$(PROG):%: %.o $(LIB_FILE)
+$(PROG):%: %.c $(LIB_FILE)
 	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
 
 $(LIB_FILE): $(LIB_OBJS)

-- 
Jonas Fonseca