2 CFLAGS
= -Wall
-W
-Wmissing-declarations
-Wmissing-prototypes
-g
-O0 \
3 -Wredundant-decls
-Wshadow
-Wbad-function-cast
-Wcast-qual
4 GIT_LIBS
:= $(GIT_SRC_DIR
)/libgit.a
$(GIT_SRC_DIR
)/xdiff
/lib.a
5 GIT_LIBS
+= -lz
-lcrypto
6 GIT_HEADERS
= -I
$(GIT_SRC_DIR
) -DSHA1_HEADER
=\
<openssl
/sha.h\
>
8 # Programs that do not depend on the git library are compiled
11 PROGRAMS
= read-index dump-pack-idx-v1 unpack-entry dump-sha1-list
12 PROG_DEP_LIB
= commit-dumper read-index resolve-ref
16 commit-dumper
: commit-dumper.c
17 $(CC
) -o
$@
$+ $(GIT_LIBS
) $(GIT_HEADERS
) $(CFLAGS
)
19 resolve-ref
: resolve-ref.c
20 $(CC
) -o
$@
$+ $(GIT_LIBS
) $(GIT_HEADERS
) $(CFLAGS
)
22 read-index
: read-index.c
23 $(CC
) -o
$@
$< $(CFLAGS
)
25 dump-pack-idx-v1
: dump-pack-idx-v1.c
26 $(CC
) -o
$@
$< $(CFLAGS
)
28 unpack-entry
: unpack-entry.c
29 $(CC
) -o
$@
$< $(CFLAGS
) -lz
31 dump-sha1-list
: dump-sha1-list.c
32 $(CC
) -o
$@
$< $(CFLAGS
)
37 rm -f
$(PROGRAMS
) $(PROG_DEP_LIB
) *~
*.o