source: roaraudio/build-system/Makefile.install @ 5885:e1f3bdc847fa

Last change on this file since 5885:e1f3bdc847fa was 5885:e1f3bdc847fa, checked in by phi, 11 years ago

added support to install plugins

File size: 4.7 KB
Line 
1#     Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2012
2#
3# This file is part of roard a part of RoarAudio,
4# a cross-platform sound system for both, home and professional use.
5# See README for details.
6#
7# This file is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 3
9# as published by the Free Software Foundation.
10#
11# RoarAudio is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this software; see the file COPYING.  If not, write to
18# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19# Boston, MA 02110-1301, USA.
20
21RABS_INSTALL_TARGETS_PREP_DIRS    := $(foreach c,$(RABS_INSTALL_TARGETS),prep-install-dirs-$c)
22RABS_INSTALL_TARGETS_INSTALL      := $(foreach c,$(RABS_INSTALL_TARGETS),install-$c)
23RABS_INSTALL_TARGETS_SEMI_INSTALL := $(foreach c,$(RABS_INSTALL_TARGETS),semi-install-$c)
24RABS_INSTALL_TARGETS_UNINSTALL    := $(foreach c,$(RABS_INSTALL_TARGETS),uninstall-$c)
25
26prep-install-dirs: $(RABS_INSTALL_TARGETS_PREP_DIRS)
27prep-install: all prep-install-dirs
28install: $(RABS_INSTALL_TARGETS_INSTALL)
29semi-install: $(RABS_INSTALL_TARGETS_SEMI_INSTALL)
30uninstall: $(RABS_INSTALL_TARGETS_UNINSTALL)
31
32prep-install-dirs-bin:
33        mkdir -p '$(DESTDIR)$(PREFIX_BIN)'
34        mkdir -p '$(DESTDIR)$(PREFIX_MAN)'/man1/
35prep-install-dirs-tools: prep-install-dirs-bin
36prep-install-dirs-header:
37        mkdir -p '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)'
38prep-install-dirs-lib: prep-install-dirs-header
39        mkdir -p '$(DESTDIR)$(PREFIX_LIB)'
40        mkdir -p '$(DESTDIR)$(PREFIX_PC)'
41        mkdir -p '$(DESTDIR)$(PREFIX_MAN)'/man3/
42        mkdir -p '$(DESTDIR)$(PREFIX_CKPORT)'
43prep-install-dirs-plugin:
44        mkdir -p '$(DESTDIR)$(PLUGIN_PATH)'
45
46prep-install-bin: all prep-install-dirs-bin
47prep-install-tools: all prep-install-dirs-tools
48prep-install-header: all prep-install-dirs-header
49prep-install-lib: all prep-install-dirs-lib
50prep-install-plugin: all prep-install-dirs-plugin
51
52# this works for both, -bin and -tools
53install-bin: prep-install-bin
54        cp $(cp_v) $(TARGETS)   '$(DESTDIR)$(PREFIX_BIN)'
55        cp $(cp_v) $(MANPAGE_1) '$(DESTDIR)$(PREFIX_MAN)'/man1/
56install-tools: install-bin
57install-lib: prep-install-lib
58        cp $(cp_v) $(TARGETS)   '$(DESTDIR)$(PREFIX_LIB)'
59        cp $(cp_v) $(PCLIBNAME) '$(DESTDIR)$(PREFIX_PC)'
60        cp $(cp_v) $(CKPORTDB)  '$(DESTDIR)$(PREFIX_CKPORT)'
61        sh -c 'set -e; for file in $(HEADERS);    do cp $(cp_v) $(HEADERS_DIR)/$$file '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)'; done'
62        sh -c 'set -e; for file in $(MANPAGE_3);  do cp $(cp_v) $$file '$(DESTDIR)$(PREFIX_MAN)'/man3/; done'
63#       cp $(cp_v) $(CKPORTDB)
64install-plugin: prep-install-plugin
65        cp $(cp_v) $(TARGETS) '$(DESTDIR)$(PLUGIN_PATH)'/
66
67semi-install-bin: prep-install-bin
68        ln -fs `pwd`/$(TARGET)  '$(DESTDIR)$(PREFIX_BIN)'
69        ln -fs `pwd`/$(MANPAGE_1) '$(DESTDIR)$(PREFIX_MAN)'/man1/
70semi-install-tools: prep-install-tools
71        sh -c 'set -e; for file in $(TARGETS);    do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_BIN)'/; done'
72        sh -c 'set -e; for file in $(MANPAGE_1);  do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_MAN)'/man1/; done'
73semi-install-lib: prep-install-lib
74        sh -c 'set -e; for file in $(TARGETS);    do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/; done'
75        ln -fs `pwd`/$(PCLIBNAME)  '$(DESTDIR)$(PREFIX_PC)'
76        ln -fs `pwd`/$(CKPORTDB)   '$(DESTDIR)$(PREFIX_CKPORT)'
77        sh -c 'set -e; for file in $(HEADERS);    do ln -fs `pwd`/$(HEADERS_DIR)/$$file '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)'; done'
78        sh -c 'set -e; for file in $(MANPAGE_3);  do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_MAN)'/man3/; done'
79semi-install-plugin: prep-install-plugin
80        sh -c 'set -e; for file in $(TARGETS);    do ln -fs `pwd`/$$file '$(DESTDIR)$(PLUGIN_PATH)/'; done'
81
82uninstall-bin:
83        rm -f '$(DESTDIR)$(PREFIX_BIN)/$(TARGET)'
84        rm -f '$(DESTDIR)$(PREFIX_MAN)/man1/$(MANPAGE_1)'
85uninstall-tools:
86        sh -c 'set -e; for file in $(TARGETS);    do rm -f '$(DESTDIR)$(PREFIX_BIN)/'$$file; done'
87        sh -c 'set -e; for file in $(MANPAGE_1);  do rm -f '$(DESTDIR)$(PREFIX_MAN)/man1/'$$file; done'
88uninstall-lib:
89        sh -c 'set -e; for file in $(TARGETS);    do rm -f '$(DESTDIR)$(PREFIX_LIB)/'$$file; done'
90        rm -f '$(DESTDIR)$(PREFIX_PC)/$(PCLIBNAME)'
91        rm -f '$(DESTDIR)$(PREFIX_CKPORT)/$(CKPORTDB)'
92        sh -c 'set -e; for file in $(HEADERS);    do rm -f '$(DESTDIR)$(PREFIX_INC)'/'$(HEADER_PREFIX)/'$$file; done'
93        sh -c 'set -e; for file in $(MANPAGE_3);  do rm -f '$(DESTDIR)$(PREFIX_MAN)/man3/$$file'; done'
94uninstall-plugin:
95        sh -c 'set -e; for file in $(TARGETS);    do rm -f '$(DESTDIR)$(PLUGIN_PATH)/'$$file; done'
Note: See TracBrowser for help on using the repository browser.