-VERSION: force-version
- @./gen-version.sh "$(CGIT_VERSION)"
--include VERSION
-
-
-CFLAGS += -g -Wall -Igit
-CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
-CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
-CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
-CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
-CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
-
-GIT_OPTIONS = prefix=/usr
-
-ifdef NO_ICONV
- CFLAGS += -DNO_ICONV
-endif
-ifdef NO_STRCASESTR
- CFLAGS += -DNO_STRCASESTR
-endif
-ifdef NO_C99_FORMAT
- CFLAGS += -DNO_C99_FORMAT
-endif
-ifdef NO_OPENSSL
- CFLAGS += -DNO_OPENSSL
- GIT_OPTIONS += NO_OPENSSL=1
-else
- EXTLIBS += -lcrypto
-endif
-
-cgit: $(OBJECTS) libgit
- $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
-
-cgit.o: VERSION
-
-ifneq "$(MAKECMDGOALS)" "clean"
- -include $(OBJECTS:.o=.d)
-endif
-
-libgit:
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a
-
-test: all