Makefile: add 'strip' target
This is not invoked by any other target (most notably, "make install" does not), but is provided as a convenience for people who are building from the source. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 12, 2006 at 21:42 UTC
4dc00021f784697e6d196ec285c8689d0777c533
1 file changed
+5
-1
Makefile
+5
-1
@@ -65,6 +65,7 @@ CFLAGS = -g -O2 -Wall
65
LDFLAGS =
66
ALL_CFLAGS = $(CFLAGS)
67
ALL_LDFLAGS = $(LDFLAGS)
68
+STRIP ?= strip
69
70
prefix = $(HOME)
71
bindir = $(prefix)/bin
@@ -371,6 +372,9 @@ all: $(ALL_PROGRAMS)
372
all:
373
$(MAKE) -C templates
374
375
+strip: $(PROGRAMS) git$X
376
+ $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
377
+
378
git$X: git.c $(LIB_FILE)
379
$(CC) -DGIT_EXEC_PATH='"$(bindir)"' -DGIT_VERSION='"$(GIT_VERSION)"' \
380
$(CFLAGS) $(COMPAT_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE)
@@ -512,6 +516,6 @@ clean:
516
$(MAKE) -C t/ clean
517
rm -f GIT-VERSION-FILE
518
515
-.PHONY: all install clean
519
+.PHONY: all install clean strip
520
.PHONY: .FORCE-GIT-VERSION-FILE
521