prefix=$(HOME)
bindir=$(prefix)/bin
-etcdir=$(prefix)/etc
-etcgitdir=$(etcdir)/git-core
+template_dir=$(prefix)/share/git-core/templates/
# dest=
CC?=gcc
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 \
- 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 \
+ sha1_name.o
LIB_H += rev-cache.h
LIB_OBJS += rev-cache.o
endif
CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)'
-CFLAGS += '-DDEFAULT_GIT_TEMPLATE_ENVIRONMENT="$(etcgitdir)/templates"'
all: $(PROG)
+all:
+ $(MAKE) -C templates
.PRECIOUS: %.o
git-%: %.o $(LIB_FILE)
git-http-pull: LIBS += -lcurl
git-rev-list: LIBS += $(OPENSSL_LIBSSL)
+init-db.o: init-db.c
+ $(CC) -c $(CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c
+
$(LIB_OBJS): $(LIB_H)
$(DIFF_OBJS): diffcore.h