summaryrefslogtreecommitdiff
path: root/tools/Makefile
blob: 5cc6d14ebc8d0bf7d91157ed57da6399fe30511a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# Make Linus git-tools
#
CC=gcc
CFLAGS = -O2 -g -Wall
ALL_CFLAGS = $(CFLAGS)
INSTALL=install
prefix=$(HOME)
bindir=$(prefix)/bin
# DESTDIR=

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 $(DESTDIR)$(bindir)
	$(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)$(bindir)

clean:
	rm -f $(PROGRAMS) *.o