# Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2012 # # This file is part of roard a part of RoarAudio, # a cross-platform sound system for both, home and professional use. # See README for details. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 # as published by the Free Software Foundation. # # RoarAudio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this software; see the file COPYING. If not, write to # the Free Software Foundation, 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. RABS_INSTALL_TARGETS_PREP_DIRS := $(foreach c,$(RABS_INSTALL_TARGETS),prep-install-dirs-$c) RABS_INSTALL_TARGETS_INSTALL := $(foreach c,$(RABS_INSTALL_TARGETS),install-$c) RABS_INSTALL_TARGETS_SEMI_INSTALL := $(foreach c,$(RABS_INSTALL_TARGETS),semi-install-$c) RABS_INSTALL_TARGETS_UNINSTALL := $(foreach c,$(RABS_INSTALL_TARGETS),uninstall-$c) prep-install-dirs: $(RABS_INSTALL_TARGETS_PREP_DIRS) prep-install: all prep-install-dirs install: $(RABS_INSTALL_TARGETS_INSTALL) semi-install: $(RABS_INSTALL_TARGETS_SEMI_INSTALL) uninstall: $(RABS_INSTALL_TARGETS_UNINSTALL) prep-install-dirs-bin: mkdir -p '$(DESTDIR)$(PREFIX_BIN)' mkdir -p '$(DESTDIR)$(PREFIX_MAN)'/man1/ prep-install-dirs-tools: prep-install-dirs-bin prep-install-dirs-header: mkdir -p '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)' prep-install-dirs-lib: prep-install-dirs-header mkdir -p '$(DESTDIR)$(PREFIX_LIB)' mkdir -p '$(DESTDIR)$(PREFIX_PC)' mkdir -p '$(DESTDIR)$(PREFIX_MAN)'/man3/ mkdir -p '$(DESTDIR)$(PREFIX_CKPORT)' prep-install-bin: all prep-install-dirs-bin prep-install-tools: all prep-install-dirs-tools prep-install-header: all prep-install-dirs-header prep-install-lib: all prep-install-dirs-lib # this works for both, -bin and -tools install-bin: prep-install-bin cp $(cp_v) $(TARGETS) '$(DESTDIR)$(PREFIX_BIN)' cp $(cp_v) $(MANPAGE_1) '$(DESTDIR)$(PREFIX_MAN)'/man1/ install-tools: install-bin install-lib: prep-install-lib cp $(cp_v) $(TARGETS) '$(DESTDIR)$(PREFIX_LIB)' cp $(cp_v) $(PCLIBNAME) '$(DESTDIR)$(PREFIX_PC)' cp $(cp_v) $(CKPORTDB) '$(DESTDIR)$(PREFIX_CKPORT)' sh -c 'set -e; for file in $(HEADERS); do cp $(cp_v) $(HEADERS_DIR)/$$file '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)'; done' sh -c 'set -e; for file in $(MANPAGE_3); do cp $(cp_v) $$file '$(DESTDIR)$(PREFIX_MAN)'/man3/; done' # cp $(cp_v) $(CKPORTDB) semi-install-bin: prep-install-bin ln -fs `pwd`/$(TARGET) '$(DESTDIR)$(PREFIX_BIN)' ln -fs `pwd`/$(MANPAGE_1) '$(DESTDIR)$(PREFIX_MAN)'/man1/ semi-install-tools: prep-install-tools sh -c 'set -e; for file in $(TARGETS); do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_BIN)'/; done' sh -c 'set -e; for file in $(MANPAGE_1); do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_MAN)'/man1/; done' semi-install-lib: prep-install-lib sh -c 'set -e; for file in $(TARGETS); do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/; done' ln -fs `pwd`/$(PCLIBNAME) '$(DESTDIR)$(PREFIX_PC)' ln -fs `pwd`/$(CKPORTDB) '$(DESTDIR)$(PREFIX_CKPORT)' sh -c 'set -e; for file in $(HEADERS); do ln -fs `pwd`/$(HEADERS_DIR)/$$file '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)'; done' sh -c 'set -e; for file in $(MANPAGE_3); do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_MAN)'/man3/; done' uninstall-bin: rm -f '$(DESTDIR)$(PREFIX_BIN)/$(TARGET)' rm -f '$(DESTDIR)$(PREFIX_MAN)/man1/$(MANPAGE_1)' uninstall-tools: sh -c 'set -e; for file in $(TARGETS); do rm -f '$(DESTDIR)$(PREFIX_BIN)/'$$file; done' sh -c 'set -e; for file in $(MANPAGE_1); do rm -f '$(DESTDIR)$(PREFIX_MAN)/man1/'$$file; done' uninstall-lib: sh -c 'set -e; for file in $(TARGETS); do rm -f '$(DESTDIR)$(PREFIX_LIB)/'$$file; done' rm -f '$(DESTDIR)$(PREFIX_PC)/$(PCLIBNAME)' rm -f '$(DESTDIR)$(PREFIX_CKPORT)/$(CKPORTDB)' sh -c 'set -e; for file in $(HEADERS); do rm -f '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)/'$$file; done' sh -c 'set -e; for file in $(MANPAGE_3); do rm -f '$(DESTDIR)$(PREFIX_MAN)/man3/$$file'; done'