X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=tools%2FMakefile;h=e423af9593208338e83222855c255ee8f3a39b0b;hb=76cd8eb619cf2896b5171d46d6bbf8e97d19e728;hp=8e7252e592e1eab9cdacdb12a09ce9cd5ab5528e;hpb=07ee0d77c66d6f356cd3f82435e67510779aa53c;p=git.git diff --git a/tools/Makefile b/tools/Makefile index 8e7252e5..e423af95 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,14 +1,26 @@ +# +# Make Linus git-tools +# CC=gcc -CFLAGS=-Wall -O2 +COPTS=-O2 +CFLAGS=-g $(COPTS) -Wall +INSTALL=install HOME=$(shell echo $$HOME) +prefix=$(HOME) +bindir=$(prefix)/bin +# dest= -PROGRAMS=mailsplit mailinfo -SCRIPTS=applymbox applypatch +PROGRAMS=git-mailsplit git-mailinfo +SCRIPTS=git-applymbox git-applypatch + +git-%: %.c + $(CC) $(CFLAGS) -o $@ $(filter %.c,$^) all: $(PROGRAMS) install: $(PROGRAMS) $(SCRIPTS) - cp -f $(PROGRAMS) $(SCRIPTS) $(HOME)/bin/ + $(INSTALL) -m755 -d $(dest)$(bindir) + $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(dest)$(bindir) clean: rm -f $(PROGRAMS) *.o