source: roaraudio/Makefile @ 4859:317062b26155

Last change on this file since 4859:317062b26155 was 4859:317062b26155, checked in by phi, 11 years ago

Install ckport database

File size: 3.8 KB
Line 
1include Makefile.conf
2include Makefile.inc
3
4COMP_LIB=$(subdir_libroaresd) $(subdir_libroarsndio) $(subdir_libroaryiff) $(subdir_libroarpulse) $(subdir_libroararts) $(subdir_libroaross) $(subdir_libroarrsound)
5
6SUBDIRS=$(comp_libs) $(COMP_LIB) $(comp_comp_bins) $(subdir_roarfish) $(comp_clients) $(comp_roard) $(comp_doc)
7
8PLUGINS=$(subdir_plugins_ao) $(subdir_plugins_xmms) $(subdir_plugins_audacious)
9
10PREFIX_CKPORT=$(PREFIX_LIB)/ckport/db/
11CKPORTDB=libroar.ckport
12
13all:
14        set -e; for i in ${SUBDIRS}; do cd $$i; $(MAKE) all; cd ..; done;
15        set -e; for i in ${PLUGINS}; do cd $$i; $(MAKE) all; cd ../..; done;
16clean:
17        rm -f lib/* || true
18        set -e; for i in ${SUBDIRS}; do cd $$i; $(MAKE) clean; cd ..; done;
19        set -e; for i in ${PLUGINS}; do cd $$i; $(MAKE) clean; cd ../..; done;
20        set -e; cd tests/; $(MAKE) clean; cd ..;
21
22distclean: clean
23        rm -f Makefile.conf config.log include/roaraudio/config.h
24
25new: clean all
26
27test: all
28        set -e; cd tests; $(MAKE) test; cd ..;
29
30build-pc-files:
31        set -e; if [ "$(CROSS_COMPILE)" = "false" -o "$(CROSS_COMPILE)" = "true" -a "$(EXEC_HELPER)" != "" ]; then for lib in $(comp_libs); do $(EXEC_HELPER) ./lib/roar-config --output-pc $$lib > lib/$$lib.pc; done; fi
32
33prep-install: prep-install-dirs build-pc-files
34
35prep-install-dirs:
36        mkdir -p '$(DESTDIR)$(PREFIX_BIN)'
37        mkdir -p '$(DESTDIR)$(PREFIX_LIB)'
38        mkdir -p '$(DESTDIR)$(PREFIX_INC)'
39        mkdir -p '$(DESTDIR)$(PREFIX_MAN)'
40        mkdir -p '$(DESTDIR)$(PREFIX_PC)'
41        mkdir -p '$(DESTDIR)$(PREFIX_COMP_LIBS)'
42        mkdir -p '$(DESTDIR)$(PREFIX_COMP_BINS)'
43        mkdir -p '$(DESTDIR)$(PREFIX_CKPORT)'
44        set -e; cd doc; $(MAKE) prep-install-dirs; cd ..
45
46install: prep-install
47        cp $(cp_v) lib/roar*     '$(DESTDIR)$(PREFIX_BIN)'
48        cp $(cp_v) $(CKPORTDB)   '$(DESTDIR)$(PREFIX_CKPORT)'
49        set -e; if [ "$(CROSS_COMPILE)" = "false" -o "$(CROSS_COMPILE)" = "true" -a "$(EXEC_HELPER)" != "" ]; then cp $(cp_v) lib/*.pc      '$(DESTDIR)$(PREFIX_PC)'; fi
50        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do cp $$file '$(DESTDIR)$(PREFIX_LIB)'/$$file.$(COMMON_SOVERSION); done'
51        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs $$file.$(COMMON_SOVERSION) '$(DESTDIR)$(PREFIX_LIB)'/$$file; done'
52        sh -c 'set -e; cd lib; while read d t; do ln -fs '$(PREFIX_LIB)'/$$d '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; done < ../symlinks.comp'
53        sh -c 'set -e; cd lib; for file in *$(COMPBIN_SUFFIX); do b=`basename $$file $(COMPBIN_SUFFIX)`; cp $$file '$(DESTDIR)$(PREFIX_COMP_BINS)'/$$b; done'
54        sh -c 'set -e; for file in include/roar* include/lib*; do cp $(cp_v) -r $$file '$(DESTDIR)$(PREFIX_INC)'/; done'
55        set -e; cd doc; $(MAKE) install; cd ..
56        set -e; for i in $(PLUGINS); do if [ "$$i" != '' ]; then cd $$i; $(MAKE) install; cd ../..; fi; done
57
58semi-install: prep-install
59        sh -c 'set -e; for file in lib/roar*;    do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_BIN)'/; done'
60        ln -fs `pwd`/$(CKPORTDB) '$(DESTDIR)$(PREFIX_CKPORT)/'
61        sh -c 'set -e; if [ "$(CROSS_COMPILE)" = "false" -o "$(CROSS_COMPILE)" = "true" -a "$(EXEC_HELPER)" != "" ]; then for file in lib/*.pc;     do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_PC)'/; done; fi'
62        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/; done'
63        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/$$file.$(COMMON_SOVERSION); done'
64        sh -c 'set -e; cd lib; while read d t; do ln -fs `pwd`/$$d '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; done < ../symlinks.comp'
65        sh -c 'set -e; cd lib; for file in *$(COMPBIN_SUFFIX); do b=`basename $$file $(COMPBIN_SUFFIX)`; ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_COMP_BINS)'/$$b; done'
66        sh -c 'set -e; for file in include/roar* include/lib*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_INC)'/; done'
67        set -e; cd doc; $(MAKE) semi-install; cd ..
68        set -e; for i in $(PLUGINS); do if [ "$$i" != '' ]; then cd $$i; $(MAKE) semi-install; cd ../..; fi; done
Note: See TracBrowser for help on using the repository browser.