-#
-# Define a pattern rule for automatic dependency building
-#
-%.d: %.c
- $(QUIET_MM)$(CC) $(CFLAGS) -MM $< | sed -e 's/\($*\)\.o:/\1.o $@:/g' >$@
-
-#
-# Define a pattern rule for silent object building
-#
-%.o: %.c
- $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
-
-
-EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lpthread
-OBJECTS =
-OBJECTS += cache.o
-OBJECTS += cgit.o
-OBJECTS += cmd.o
-OBJECTS += configfile.o
-OBJECTS += html.o
-OBJECTS += parsing.o
-OBJECTS += scan-tree.o
-OBJECTS += shared.o
-OBJECTS += ui-atom.o
-OBJECTS += ui-blob.o
-OBJECTS += ui-clone.o
-OBJECTS += ui-commit.o
-OBJECTS += ui-diff.o
-OBJECTS += ui-log.o
-OBJECTS += ui-patch.o
-OBJECTS += ui-plain.o
-OBJECTS += ui-refs.o
-OBJECTS += ui-repolist.o
-OBJECTS += ui-shared.o
-OBJECTS += ui-snapshot.o
-OBJECTS += ui-ssdiff.o
-OBJECTS += ui-stats.o
-OBJECTS += ui-summary.o
-OBJECTS += ui-tag.o
-OBJECTS += ui-tree.o
-
-ifdef NEEDS_LIBICONV
- EXTLIBS += -liconv
-endif
-
-
-.PHONY: all libgit test install uninstall clean force-version get-git \
- doc man-doc html-doc clean-doc
-
-all: cgit
-
-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)"'
-
-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)