Make CFLAGS overridable from make command line.
[git/git.git] / tools / Makefile
CommitLineData
8cc39306
JH
1#
2# Make Linus git-tools
3#
2744b234 4CC=gcc
b05701c5
PR
5CFLAGS = -O2 -g -Wall
6ALL_CFLAGS = $(CFLAGS)
8cc39306 7INSTALL=install
8cc39306 8prefix=$(HOME)
a52b41b2 9bindir=$(prefix)/bin
8cc39306 10# dest=
2744b234 11
fd1fcd9f
LT
12PROGRAMS=git-mailsplit git-mailinfo
13SCRIPTS=git-applymbox git-applypatch
14
15git-%: %.c
b05701c5 16 $(CC) $(ALL_CFLAGS) -o $@ $(filter %.c,$^)
2744b234
LT
17
18all: $(PROGRAMS)
19
20install: $(PROGRAMS) $(SCRIPTS)
a52b41b2
JH
21 $(INSTALL) -m755 -d $(dest)$(bindir)
22 $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(dest)$(bindir)
2744b234
LT
23
24clean:
25 rm -f $(PROGRAMS) *.o