source: roaraudio/Makefile @ 5423:ecb64035ba72

Last change on this file since 5423:ecb64035ba72 was 5423:ecb64035ba72, checked in by phi, 10 years ago

added support to load plugins from search path

File size: 4.1 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
13SUFFIX_LIB=$(SHARED_SUFFIX).$(COMMON_SOVERSION)
14
15all:
16        set -e; for i in ${SUBDIRS}; do cd $$i; $(MAKE) all; cd ..; done;
17        set -e; for i in ${PLUGINS}; do cd $$i; $(MAKE) all; cd ../..; done;
18clean:
19        rm -f lib/* || true
20        set -e; for i in ${SUBDIRS}; do cd $$i; $(MAKE) clean; cd ..; done;
21        set -e; for i in ${PLUGINS}; do cd $$i; $(MAKE) clean; cd ../..; done;
22        set -e; cd tests/; $(MAKE) clean; cd ..;
23
24distclean: clean
25        rm -f Makefile.conf config.log include/roaraudio/config.h
26
27new: clean all
28
29test: all
30        set -e; cd tests; $(MAKE) test; cd ..;
31
32build-pc-files:
33        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
34
35prep-install: prep-install-dirs build-pc-files
36
37prep-install-dirs:
38        mkdir -p '$(DESTDIR)$(PREFIX_BIN)'
39        mkdir -p '$(DESTDIR)$(PREFIX_LIB)'
40        mkdir -p '$(DESTDIR)$(PREFIX_INC)'
41        mkdir -p '$(DESTDIR)$(PREFIX_MAN)'
42        mkdir -p '$(DESTDIR)$(PREFIX_PC)'
43        mkdir -p '$(DESTDIR)$(PREFIX_COMP_LIBS)'
44        mkdir -p '$(DESTDIR)$(PREFIX_COMP_BINS)'
45        mkdir -p '$(DESTDIR)$(PREFIX_CKPORT)'
46        mkdir -p '$(DESTDIR)$(PREFIX_PLUGINS)/universal/universal/$(DEV_VENDOR)-$(DEV_VENDOR_NAME)'
47        mkdir -p '$(DESTDIR)$(PREFIX_PLUGINS)/$(DEV_VENDOR)-$(DEV_VENDOR_NAME)/universal/'
48        set -e; cd doc; $(MAKE) prep-install-dirs; cd ..
49
50install: prep-install
51        cp $(cp_v) lib/roar*     '$(DESTDIR)$(PREFIX_BIN)'
52        cp $(cp_v) $(CKPORTDB)   '$(DESTDIR)$(PREFIX_CKPORT)'
53        set -e; if [ "$(CROSS_COMPILE)" = "false" -o "$(CROSS_COMPILE)" = "true" -a "$(EXEC_HELPER)" != "" ]; then cp $(cp_v) lib/*.pc      '$(DESTDIR)$(PREFIX_PC)'; fi
54        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do cp $$file '$(DESTDIR)$(PREFIX_LIB)'/$$file.$(COMMON_SOVERSION); done'
55        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs $$file.$(COMMON_SOVERSION) '$(DESTDIR)$(PREFIX_LIB)'/$$file; done'
56        sh -c 'set -e; cd lib; while read d t; do ln -fs '$(PREFIX_LIB)'/$$d$(SUFFIX_LIB) '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; done < ../symlinks.comp'
57        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'
58        sh -c 'set -e; for file in include/roar* include/lib*; do cp $(cp_v) -r $$file '$(DESTDIR)$(PREFIX_INC)'/; done'
59        set -e; cd doc; $(MAKE) install; cd ..
60        set -e; for i in $(PLUGINS); do if [ "$$i" != '' ]; then cd $$i; $(MAKE) install; cd ../..; fi; done
61
62semi-install: prep-install
63        sh -c 'set -e; for file in lib/roar*;    do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_BIN)'/; done'
64        ln -fs `pwd`/$(CKPORTDB) '$(DESTDIR)$(PREFIX_CKPORT)/'
65        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'
66        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/; done'
67        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/$$file.$(COMMON_SOVERSION); done'
68        sh -c 'set -e; cd lib; while read d t; do ln -fs `pwd`/$$d$(SHARED_SUFFIX) '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; done < ../symlinks.comp'
69        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'
70        sh -c 'set -e; for file in include/roar* include/lib*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_INC)'/; done'
71        set -e; cd doc; $(MAKE) semi-install; cd ..
72        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.