uname_rs := $(shell uname -rs)
cc_version := $(shell $(CC) --version | head -n 1)
GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h)
-COPYRIGHT_YEAR := 2016
+COPYRIGHT_YEAR := 2017
ifeq ("$(origin O)", "command line")
build_dir := $(O)
tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
tarball := $(tarball_pfx).tar.bz2
-.PHONY: all clean clean2 distclean maintainer-clean install man tarball
+.PHONY: all mostlyclean clean distclean maintainer-clean install man tarball
all: $(prefixed_executables) $(man_pages)
man: $(man_pages)
tarball: $(tarball)
@[ -z "$(Q)" ] || echo 'LD $@'
$(Q) $(CC) $^ -o $@ $(LDFLAGS)
-clean:
- @[ -z "$(Q)" ] || echo 'CLEAN'
+mostlyclean:
+ @[ -z "$(Q)" ] || echo 'MOSTLYCLEAN'
$(Q) rm -f para_*
$(Q) rm -rf $(object_dir)
-
-clean2: clean
- @[ -z "$(Q)" ] || echo 'CLEAN2'
+clean: mostlyclean
+ @[ -z "$(Q)" ] || echo 'CLEAN'
$(Q) rm -rf $(build_dir)
-distclean: clean2 test-clean
+distclean: clean
@[ -z "$(Q)" ] || echo 'DISTCLEAN'
$(Q) rm -f Makefile autoscan.log config.status config.log
- $(Q) rm -f GPATH GRTAGS GSYMS GTAGS
-
+ $(Q) rm -f config.h configure config.h.in
maintainer-clean: distclean
@[ -z "$(Q)" ] || echo 'MAINTAINER-CLEAN'
- $(Q) rm -f *.tar.bz2 config.h configure config.h.in
+ $(Q) rm -f *.tar.bz2
+ $(Q) rm -f GPATH GRTAGS GSYMS GTAGS
install: all man
- $(MKDIR_P) $(bindir) $(mandir)
+ $(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
$(INSTALL) -s --strip-program $(STRIP) -m 755 \
- $(prefixed_executables) $(bindir)
- $(INSTALL) -m 644 $(man_pages) $(mandir)
- $(MKDIR_P) $(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain
+ $(prefixed_executables) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 644 $(man_pages) $(DESTDIR)$(mandir)
+ $(MKDIR_P) $(DESTDIR)$(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain
$(tarball):
$(Q) rm -rf $(tarball) $(tarball_pfx)