projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of .
[git.git]
/
tools
/
Makefile
diff --git
a/tools/Makefile
b/tools/Makefile
index
8e7252e
..
5cc6d14
100644
(file)
--- a/
tools/Makefile
+++ b/
tools/Makefile
@@
-1,14
+1,25
@@
+#
+# Make Linus git-tools
+#
CC=gcc
CC=gcc
-CFLAGS=-Wall -O2
-HOME=$(shell echo $$HOME)
+CFLAGS = -O2 -g -Wall
+ALL_CFLAGS = $(CFLAGS)
+INSTALL=install
+prefix=$(HOME)
+bindir=$(prefix)/bin
+# DESTDIR=
-PROGRAMS=mailsplit mailinfo
-SCRIPTS=applymbox applypatch
+PROGRAMS=git-mailsplit git-mailinfo
+SCRIPTS=git-applymbox git-applypatch
+
+git-%: %.c
+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.c,$^)
all: $(PROGRAMS)
install: $(PROGRAMS) $(SCRIPTS)
all: $(PROGRAMS)
install: $(PROGRAMS) $(SCRIPTS)
- cp -f $(PROGRAMS) $(SCRIPTS) $(HOME)/bin/
+ $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
+ $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)$(bindir)
clean:
rm -f $(PROGRAMS) *.o
clean:
rm -f $(PROGRAMS) *.o