1
0
mirror of https://github.com/git/git.git synced 2024-10-07 05:41:23 +02:00
git/tools/Makefile
Pavel Roskin b05701c5b4 Make CFLAGS overridable from make command line.
This patch renames COPTS to CFLAGS, because it's COPTS that was user
overridable.  Also, -Wall is moved there because it's optional.  What
was CFLAGS is now ALL_CFLAGS, which users should not override.

Defines are added to DEFINES.  Since ALL_CFLAGS is recursively expanded,
it uses the final value of DEFINES.

Implicit rules are made explicit since the implicit rules use CFLAGS
rather than ALL_CFLAGS.  I believe that serious projects should not rely
on implicit rules anyway.  Percent rules are used because they are used
already and because they don't need the .SUFFIXES target.

[jc: in addition to updating the patch for 0.99.4, I fixed up a
glitch in Pavel's original patch which compiled sha1.o out of
mozilla-sha1/sha1.c, where it should have left the resulting
object file in mozilla-sha1 directory for later "ar".]

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12 10:38:22 -07:00

26 lines
441 B
Makefile

#
# Make Linus git-tools
#
CC=gcc
CFLAGS = -O2 -g -Wall
ALL_CFLAGS = $(CFLAGS)
INSTALL=install
prefix=$(HOME)
bindir=$(prefix)/bin
# dest=
PROGRAMS=git-mailsplit git-mailinfo
SCRIPTS=git-applymbox git-applypatch
git-%: %.c
$(CC) $(ALL_CFLAGS) -o $@ $(filter %.c,$^)
all: $(PROGRAMS)
install: $(PROGRAMS) $(SCRIPTS)
$(INSTALL) -m755 -d $(dest)$(bindir)
$(INSTALL) $(PROGRAMS) $(SCRIPTS) $(dest)$(bindir)
clean:
rm -f $(PROGRAMS) *.o