pack.h pkt-line.h refs.h
LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
tag.o date.o index.o diff-delta.o patch-delta.o entry.o path.o \
- epoch.o refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o
+ refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o
LIB_H += rev-cache.h
LIB_OBJS += rev-cache.o
LIBS = $(LIB_FILE)
LIBS += -lz
+ifndef NO_OPENSSL
+ LIB_OBJS += epoch.o
+ OPENSSL_LIBSSL=-lssl
+else
+ CFLAGS += '-DNO_OPENSSL'
+ MOZILLA_SHA1=1
+ OPENSSL_LIBSSL=
+endif
ifdef MOZILLA_SHA1
SHA1_HEADER="mozilla-sha1/sha1.h"
LIB_OBJS += mozilla-sha1/sha1.o
all: $(PROG)
-git-%: %.c $(LIB_FILE)
- $(CC) $(CFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
+.PRECIOUS: %.o
+git-%: %.o $(LIB_FILE)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
-git-http-pull: pull.c
-git-local-pull: pull.c
-git-ssh-pull: rsh.c pull.c
-git-ssh-push: rsh.c
+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
+git-rev-list: LIBS += $(OPENSSL_LIBSSL)
$(LIB_OBJS): $(LIB_H)
$(DIFF_OBJS): diffcore.h
install: $(PROG) $(SCRIPTS)
$(INSTALL) -m755 -d $(dest)$(bindir)
- $(INSTALL) $(PROG) $(SCRIPTS) $(dest)$(bin)
+ $(INSTALL) $(PROG) $(SCRIPTS) $(dest)$(bindir)
install-tools:
$(MAKE) -C tools install