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