pcap_rw: Fix compiler warnings
[netsniff-ng.git] / Cmds
blobf2fc8cb445d56f5f82909b2defc2129a1522b9f6
1 # Be quite and do not echo the cmd
2 Q = @
4 # GCC related stuff
5 LD = $(Q)echo -e "  LD\t$@" && $(CCACHE) $(CROSS_COMPILE)gcc
6 CCNQ = $(CCACHE) $(CROSS_COMPILE)gcc
7 CC = $(Q)echo -e "  CC\t$<" && $(CCNQ)
8 ifeq ($(DEBUG), 1)
9   STRIP = $(Q)true
10 else
11   STRIP = $(Q)echo -e "  STRIP\t$@" && $(CROSS_COMPILE)strip
12 endif
14 # Flex/bison related
15 LEX = $(Q)echo -e "  LEX\t$<" && flex
16 YAAC = $(Q)echo -e "  YAAC\t$<" && bison
18 # Installation related
19 INST = echo -e "  INST\t$(1)" && install -d $(2) && \
20         install --mode=644 -DC $(1) $(2)/$(shell basename $(1))
22 ifeq ("$(origin PREFIX)", "command line")
23   INSTX = echo -e "  INST\t$(1)" && install -d $(2) && \
24         install -C $(1) $(2)/$(shell basename $(1))
25 else
26   INSTX = echo -e "  INST\t$(1)" && install -C $(1) $(2)/$(shell basename $(1))
27 endif
29 RM = echo -e "  RM\t$(1)" && rm -rf $(1)
30 RMDIR = echo -e "  RM\t$(1)" && rmdir --ignore-fail-on-non-empty $(1) 2> /dev/null || true
32 GZIP = gzip --best -c
34 # Git related
35 GIT_ARCHIVE = git archive --prefix=netsniff-ng-$(VERSION_SHORT)/ v$(VERSION_SHORT) | \
36               $(1) > ../netsniff-ng-$(VERSION_SHORT).tar.$(2)
37 GIT_TAG = git tag -a v$(VERSION_SHORT) -s -m "$(VERSION_SHORT) release"
38 GIT_LOG = git shortlog -n $(shell git tag | tail -n2 | head -n1)..HEAD
39 GIT_REM = git ls-files -o | xargs rm -rf
40 GIT_PEOPLE = git log --no-merges $(shell git tag | tail -n2 | head -n1)..HEAD | grep Author: | cut -d: -f2 | \
41              cut -d\< -f1 | sort | uniq -c | sort -nr