source: roaraudio/Makefile @ 2909:20a721526f9a

Last change on this file since 2909:20a721526f9a was 2909:20a721526f9a, checked in by phi, 15 years ago

use list of comp libs to create the symlinks

File size: 2.3 KB
Line 
1include Makefile.conf
2
3COMP_LIB=$(subdir_libroaresd) $(subdir_libroarsndio) $(subdir_libroaryiff) $(subdir_libroarpulse) $(subdir_libroararts)
4
5SUBDIRS=$(comp_libs) $(subdir_libroaresd) $(comp_roard) $(comp_clients) $(comp_doc) $(comp_comp_bins) $(subdir_libroarsndio) $(subdir_roarfish) $(subdir_libroaryiff) $(subdir_libroarpulse) $(subdir_libroararts)
6
7PLUGINS=$(subdir_plugins_ao) $(subdir_plugins_xmms) $(subdir_plugins_audacious)
8
9all:
10        for i in ${SUBDIRS}; do cd $$i; $(MAKE) all; cd ..; done;
11        for i in ${PLUGINS}; do cd $$i; $(MAKE) all; cd ../..; done;
12clean:
13        rm -f lib/* || true
14        for i in ${SUBDIRS}; do cd $$i; $(MAKE) clean; cd ..; done;
15        for i in ${PLUGINS}; do cd $$i; $(MAKE) clean; cd ../..; done;
16
17new: clean all
18
19test: all
20        cd tests; make test; cd ..;
21
22prep-install-dirs:
23        mkdir -p '$(DESTDIR)$(PREFIX_BIN)'
24        mkdir -p '$(DESTDIR)$(PREFIX_LIB)'
25        mkdir -p '$(DESTDIR)$(PREFIX_INC)'
26        mkdir -p '$(DESTDIR)$(PREFIX_MAN)'
27        mkdir -p '$(DESTDIR)$(PREFIX_COMP_LIBS)'
28        mkdir -p '$(DESTDIR)$(PREFIX_COMP_BINS)'
29        cd doc; make prep-install-dirs; cd ..
30
31install: prep-install-dirs
32        cp $(cp_v) lib/roar*     '$(DESTDIR)$(PREFIX_BIN)'
33        cp $(cp_v) lib/lib*$(SHARED_SUFFIX)*  '$(DESTDIR)$(PREFIX_LIB)'
34        sh -c 'cd lib; while read d t; do ln -fs '$(DESTDIR)$(PREFIX_LIB)'/$$d '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; done < ../symlinks.comp'
35        sh -c 'cd lib; for file in *.r; do b=`basename $$file .r`; cp $$file '$(DESTDIR)$(PREFIX_COMP_BINS)'/$$b; done'
36        sh -c 'for file in include/roar* include/lib*; do cp $(cp_v) -r $$file '$(DESTDIR)$(PREFIX_INC)'/; done'
37        cd doc; make install; cd ..
38        for i in $(PLUGINS); do if [ "$$i" != '' ]; then cd $$i; make install; cd ../..; fi; done
39
40semi-install: prep-install-dirs
41        sh -c 'for file in lib/roar*;    do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_BIN)'/; done'
42        sh -c 'for file in lib/lib*$(SHARED_SUFFIX)*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/; done'
43        sh -c 'cd lib; while read d t; do ln -fs `pwd`/$$d '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; done < ../symlinks.comp'
44        sh -c 'cd lib; for file in *.r; do b=`basename $$file .r`; ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_COMP_BINS)'/$$b; done'
45        sh -c 'for file in include/roar* include/lib*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_INC)'/; done'
46        cd doc; make semi-install; cd ..
47        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.