X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.real;h=d2d316673d4dba08e650f2ecf28d075d8bcacc8f;hp=956d60c08e6c086ca1ffdb9f49cb75466cbb28ac;hb=9264932e;hpb=2ddd3e0c78a3446d227892002a648a744668988b diff --git a/Makefile.real b/Makefile.real index 956d60c0..d2d31667 100644 --- a/Makefile.real +++ b/Makefile.real @@ -9,7 +9,6 @@ endif vardir := /var/paraslash mandir := $(datarootdir)/man/man1 -STRIP := $(CROSS_COMPILE)strip MKDIR_P := mkdir -p prefixed_executables := $(addprefix para_, $(executables)) @@ -63,10 +62,11 @@ tarball_pfx := $(PACKAGE_TARNAME)-$(GIT_VERSION) tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore) tarball := $(tarball_pfx).tar.bz2 -.PHONY: all clean clean2 distclean maintainer-clean install man tarball all: $(prefixed_executables) $(man_pages) +.PHONY: all mostlyclean clean distclean maintainer-clean install \ + install-strip man dist tarball + man: $(man_pages) -tarball: $(tarball) include $(m4_ggo_dir)/makefile include $(test_dir)/makefile.test @@ -113,8 +113,6 @@ STRICT_CFLAGS += -Wformat -Wformat-security STRICT_CFLAGS += -Wmissing-format-attribute STRICT_CFLAGS += -Wdeclaration-after-statement -LDFLAGS += $(clock_gettime_ldflags) - ifeq ($(uname_s),Linux) # these cause warnings on *BSD CPPFLAGS += -Wunused-macros @@ -280,7 +278,7 @@ $(dep_dir)/%.d: %.c | $(dep_dir) para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags) para_write para_play para_audiod \ -: LDFLAGS += $(ao_ldflags) $(pthread_ldflags) $(core_audio_ldflags) +: LDFLAGS += $(ao_ldflags) $(pthread_ldflags) para_client para_audioc para_play : LDFLAGS += $(readline_ldflags) para_server: LDFLAGS += $(osl_ldflags) para_gui: LDFLAGS += $(curses_ldflags) @@ -328,31 +326,36 @@ $(prefixed_executables): @[ -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 ?= install +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= $(INSTALL) -m 644 +ifneq ($(findstring strip, $(MAKECMDGOALS)),) + strip_option := -s +endif -install: all man - $(MKDIR_P) $(bindir) $(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 +install install-strip: all man + $(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir) + $(INSTALL) $(strip_option) $(prefixed_executables) $(DESTDIR)$(bindir) + $(INSTALL_DATA) $(man_pages) $(DESTDIR)$(mandir) + $(MKDIR_P) $(DESTDIR)$(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain -$(tarball): +$(tarball) dist tarball: $(Q) rm -rf $(tarball) $(tarball_pfx) $(Q) git archive --format=tar --prefix=$(tarball_pfx)/ HEAD \ | tar --delete $(tarball_delete) > $(tarball_pfx).tar