X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Makefile;h=51581973ab1c75e847474948bbe444db261b0e53;hb=29b802aae6213d02879d21aabac1a8d2e035b583;hp=920cb4207844648f9a7ae7e74be8b426543ea7e4;hpb=459d60084fa463203d0adfc99cbf5d6fcd7edd43;p=git.git diff --git a/Makefile b/Makefile index 920cb4207..51581973a 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,8 @@ all:: # # Define NO_MMAP if you want to avoid mmap. # +# Define NO_PTHREADS if you do not have or do not want to use Pthreads. +# # Define NO_PREAD if you have a problem with pread() system call (e.g. # cygwin.dll before v1.5.22). # @@ -164,6 +166,7 @@ uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') +uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') # CFLAGS and LDFLAGS are for the users to override from the command line. @@ -229,6 +232,7 @@ INSTALL = install RPMBUILD = rpmbuild TCL_PATH = tclsh TCLTK_PATH = wish +PTHREAD_LIBS = -lpthread export TCL_PATH TCLTK_PATH @@ -316,6 +320,7 @@ BUILT_INS += git-merge-subtree$X BUILT_INS += git-peek-remote$X BUILT_INS += git-repo-config$X BUILT_INS += git-show$X +BUILT_INS += git-stage$X BUILT_INS += git-status$X BUILT_INS += git-whatchanged$X @@ -436,7 +441,6 @@ LIB_OBJS += grep.o LIB_OBJS += hash.o LIB_OBJS += help.o LIB_OBJS += ident.o -LIB_OBJS += interpolate.o LIB_OBJS += levenshtein.o LIB_OBJS += list-objects.o LIB_OBJS += ll-merge.o @@ -495,6 +499,7 @@ LIB_OBJS += write_or_die.o LIB_OBJS += ws.o LIB_OBJS += wt-status.o LIB_OBJS += xdiff-interface.o +LIB_OBJS += preload-index.o BUILTIN_OBJS += builtin-add.o BUILTIN_OBJS += builtin-annotate.o @@ -690,6 +695,11 @@ ifeq ($(uname_S),FreeBSD) BASIC_LDFLAGS += -L/usr/local/lib DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease THREADED_DELTA_SEARCH = YesPlease + ifeq ($(shell expr "$(uname_R)" : '4\.'),2) + PTHREAD_LIBS = -pthread + NO_UINTMAX_T = YesPlease + NO_STRTOUMAX = YesPlease + endif endif ifeq ($(uname_S),OpenBSD) NO_STRCASESTR = YesPlease @@ -716,6 +726,11 @@ ifeq ($(uname_S),AIX) INTERNAL_QSORT = UnfortunatelyYes NEEDS_LIBICONV=YesPlease BASIC_CFLAGS += -D_LARGE_FILES + ifneq ($(shell expr "$(uname_V)" : '[1234]'),1) + THREADED_DELTA_SEARCH = YesPlease + else + NO_PTHREADS = YesPlease + endif endif ifeq ($(uname_S),GNU) # GNU/Hurd @@ -760,6 +775,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_STRCASESTR = YesPlease NO_STRLCPY = YesPlease NO_MEMMEM = YesPlease + NO_PTHREADS = YesPlease NEEDS_LIBICONV = YesPlease OLD_ICONV = YesPlease NO_C99_FORMAT = YesPlease @@ -949,6 +965,9 @@ endif ifdef NO_IPV6 BASIC_CFLAGS += -DNO_IPV6 endif +ifdef NO_UINTMAX_T + BASIC_CFLAGS += -Duintmax_t=uint32_t +endif ifdef NO_SOCKADDR_STORAGE ifdef NO_IPV6 BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in @@ -1008,9 +1027,15 @@ ifdef INTERNAL_QSORT COMPAT_OBJS += compat/qsort.o endif +ifdef NO_PTHREADS + THREADED_DELTA_SEARCH = + BASIC_CFLAGS += -DNO_PTHREADS +else + EXTLIBS += $(PTHREAD_LIBS) +endif + ifdef THREADED_DELTA_SEARCH BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH - EXTLIBS += -lpthread LIB_OBJS += thread-utils.o endif ifdef DIR_HAS_BSD_GROUP_SEMANTICS