X-Git-Url: https://git.proxmox.com/?p=mirror_iproute2.git;a=blobdiff_plain;f=Makefile;h=48f469b0d0a85626b9ac2f36d61fece865c57737;hp=25d05fac952a15ef7d6217ff9def8795b7b02c23;hb=HEAD;hpb=5d10f24fddb6352526a061a829e73b2a8bcd5425 diff --git a/Makefile b/Makefile index 25d05fac..19bd163e 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v -SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma man +SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a LDLIBS += $(LIBNETLINK) @@ -63,7 +63,9 @@ LDLIBS += $(LIBNETLINK) all: config.mk @set -e; \ for i in $(SUBDIRS); \ - do echo; echo $$i; $(MAKE) $(MFLAGS) -C $$i; done + do echo; echo $$i; $(MAKE) -C $$i; done + +.PHONY: clean clobber distclean check cscope version help: @echo "Make Targets:" @@ -73,7 +75,7 @@ help: @echo " install - install binaries on local machine" @echo " check - run tests" @echo " cscope - build cscope database" - @echo " snapshot - generate version number header" + @echo " version - update version" @echo "" @echo "Make Arguments:" @echo " V=[0|1] - set build verbosity level" @@ -93,17 +95,17 @@ install: all install -m 0644 bash-completion/devlink $(DESTDIR)$(BASH_COMPDIR) install -m 0644 include/bpf_elf.h $(DESTDIR)$(HDRDIR) -snapshot: - echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \ - > include/SNAPSHOT.h +version: + echo "static const char version[] = \""`git describe --tags --long`"\";" \ + > include/version.h clean: @for i in $(SUBDIRS) testsuite; \ - do $(MAKE) $(MFLAGS) -C $$i clean; done + do $(MAKE) -C $$i clean; done clobber: touch config.mk - $(MAKE) $(MFLAGS) clean + $(MAKE) clean rm -f config.mk cscope.* distclean: clobber