aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile82
1 files changed, 47 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index 92f0bda5e..133808c82 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,8 @@
#
# Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
#
+# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
+#
# Define COLLISION_CHECK below if you believe that SHA1's
# 1461501637330902918203684832716283019655932542976 hashes do not give you
# sufficient guarantee that no collisions between objects will ever happen.
@@ -48,7 +50,7 @@
# DEFINES += -DUSE_STDEV
-GIT_VERSION = 0.99.8
+GIT_VERSION = 0.99.8.GIT
CFLAGS = -g -O2 -Wall
ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES)
@@ -96,31 +98,31 @@ SCRIPT_PYTHON = \
# The ones that do not have to link with lcrypto nor lz.
SIMPLE_PROGRAMS = \
- git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \
- git-daemon git-var
+ git-get-tar-commit-id$X git-mailinfo$X git-mailsplit$X \
+ git-stripspace$X git-var$X git-daemon$X
# ... and all the rest
PROGRAMS = \
- git-apply git-cat-file \
- git-checkout-index git-clone-pack git-commit-tree \
- git-convert-objects git-diff-files \
- git-diff-index git-diff-stages \
- git-diff-tree git-fetch-pack git-fsck-objects \
- git-hash-object git-init-db \
- git-local-fetch git-ls-files git-ls-tree git-merge-base \
- git-merge-index git-mktag git-pack-objects git-patch-id \
- git-peek-remote git-prune-packed git-read-tree \
- git-receive-pack git-rev-list git-rev-parse \
- git-send-pack git-show-branch \
- git-show-index git-ssh-fetch \
- git-ssh-upload git-tar-tree git-unpack-file \
- git-unpack-objects git-update-index git-update-server-info \
- git-upload-pack git-verify-pack git-write-tree \
- git-update-ref git-symbolic-ref \
+ git-apply$X git-cat-file$X \
+ git-checkout-index$X git-clone-pack$X git-commit-tree$X \
+ git-convert-objects$X git-diff-files$X \
+ git-diff-index$X git-diff-stages$X \
+ git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \
+ git-hash-object$X git-init-db$X \
+ git-local-fetch$X git-ls-files$X git-ls-tree$X git-merge-base$X \
+ git-merge-index$X git-mktag$X git-pack-objects$X git-patch-id$X \
+ git-peek-remote$X git-prune-packed$X git-read-tree$X \
+ git-receive-pack$X git-rev-list$X git-rev-parse$X \
+ git-send-pack$X git-show-branch$X \
+ git-show-index$X git-ssh-fetch$X \
+ git-ssh-upload$X git-tar-tree$X git-unpack-file$X \
+ git-unpack-objects$X git-update-index$X git-update-server-info$X \
+ git-upload-pack$X git-verify-pack$X git-write-tree$X \
+ git-update-ref$X git-symbolic-ref$X \
$(SIMPLE_PROGRAMS)
# Backward compatibility -- to be removed after 1.0
-PROGRAMS += git-ssh-pull git-ssh-push
+PROGRAMS += git-ssh-pull$X git-ssh-push$X
GIT_LIST_TWEAK =
@@ -176,6 +178,12 @@ ifeq ($(shell uname -s),SunOS)
TAR = gtar
PLATFORM_DEFINES += -D__EXTENSIONS__
endif
+ifeq ($(shell uname -o),Cygwin)
+ NO_STRCASESTR = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ NO_IPV6 = YesPlease
+ X = .exe
+endif
ifneq (,$(findstring arm,$(shell uname -m)))
ARM_SHA1 = YesPlease
endif
@@ -192,7 +200,7 @@ ifndef NO_CURL
else
CURL_LIBCURL = -lcurl
endif
- PROGRAMS += git-http-fetch
+ PROGRAMS += git-http-fetch$X
endif
ifndef SHELL_PATH
@@ -249,6 +257,9 @@ ifdef NO_STRCASESTR
DEFINES += -Dstrcasestr=gitstrcasestr
LIB_OBJS += compat/strcasestr.o
endif
+ifdef NO_IPV6
+ DEFINES += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
+endif
ifdef PPC_SHA1
SHA1_HEADER = "ppc/sha1.h"
@@ -287,6 +298,7 @@ git: git.sh Makefile
rm -f $@+ $@
sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+ -e 's/@@X@@/$(X)/g' \
$(GIT_LIST_TWEAK) <$@.sh >$@+
chmod +x $@+
mv $@+ $@
@@ -313,30 +325,30 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py
%.o: %.S
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-git-%: %.o $(LIB_FILE)
+git-%$X: %.o $(LIB_FILE)
$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
-git-mailinfo : SIMPLE_LIB += $(LIB_4_ICONV)
+git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)
$(SIMPLE_PROGRAMS) : $(LIB_FILE)
-$(SIMPLE_PROGRAMS) : git-% : %.o
+$(SIMPLE_PROGRAMS) : git-%$X : %.o
$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB)
-git-http-fetch: fetch.o
-git-local-fetch: fetch.o
-git-ssh-fetch: rsh.o fetch.o
-git-ssh-upload: rsh.o
-git-ssh-pull: rsh.o fetch.o
-git-ssh-push: rsh.o
+git-http-fetch$X: fetch.o
+git-local-fetch$X: fetch.o
+git-ssh-fetch$X: rsh.o fetch.o
+git-ssh-upload$X: rsh.o
+git-ssh-pull$X: rsh.o fetch.o
+git-ssh-push$X: rsh.o
-git-http-fetch: LIBS += $(CURL_LIBCURL)
-git-rev-list: LIBS += $(OPENSSL_LIBSSL)
+git-http-fetch$X: LIBS += $(CURL_LIBCURL)
+git-rev-list$X: LIBS += $(OPENSSL_LIBSSL)
init-db.o: init-db.c
$(CC) -c $(ALL_CFLAGS) \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c
$(LIB_OBJS): $(LIB_H)
-$(patsubst git-%,%.o,$(PROGRAMS)): $(LIB_H)
+$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H)
$(DIFF_OBJS): diffcore.h
$(LIB_FILE): $(LIB_OBJS)
@@ -351,10 +363,10 @@ doc:
test: all
$(MAKE) -C t/ all
-test-date: test-date.c date.o
+test-date$X: test-date.c date.o
$(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o
-test-delta: test-delta.c diff-delta.o patch-delta.o
+test-delta$X: test-delta.c diff-delta.o patch-delta.o
$(CC) $(ALL_CFLAGS) -o $@ $^
check: