source: roaraudio/Makefile @ 6056:8d4468a24909

Last change on this file since 6056:8d4468a24909 was 5953:2ce9f99eea14, checked in by phi, 6 years ago

Removed roarfish(1) (Closes: #339)

File size: 4.6 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) $(comp_clients) $(comp_roard) $(comp_doc)
7
8PLUGINS=$(subdir_plugins_ao) $(subdir_plugins_xmms) $(subdir_plugins_audacious) $(subdir_plugins_roard) $(subdir_plugins_universal)
9
10CKPORTDB=libroar.ckport
11
12SUFFIX_LIB=$(SHARED_SUFFIX).$(COMMON_SOVERSION)
13
14ifeq ($(TARGET_TYPE),win32)
15SYMLINKPREFIX_ROOT=$(DESTDIR)
16SYMLINKPREFIX=$(SYMLINKPREFIX_ROOT)$(PREFIX_LIB)/
17else
18SYMLINKPREFIX_ROOT=
19SYMLINKPREFIX=
20endif
21
22all:
23        set -e; for i in ${SUBDIRS}; do cd $$i; $(MAKE) all; cd ..; done;
24        set -e; for i in ${PLUGINS}; do cd $$i; $(MAKE) all; cd ../..; done;
25clean:
26        rm -f lib/* || true
27        set -e; for i in ${SUBDIRS}; do cd $$i; $(MAKE) clean; cd ..; done;
28        set -e; for i in ${PLUGINS}; do cd $$i; $(MAKE) clean; cd ../..; done;
29        set -e; cd tests/; $(MAKE) clean; cd ..;
30
31distclean: clean
32        rm -f Makefile.conf config.log include/roaraudio/config.h
33
34new: clean all
35
36test: all
37        set -e; cd tests; $(MAKE) test; cd ..;
38
39build-pc-files:
40        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
41
42prep-install: prep-install-dirs build-pc-files
43
44prep-install-dirs:
45        mkdir -p '$(DESTDIR)$(PREFIX_BIN)'
46        mkdir -p '$(DESTDIR)$(PREFIX_LIB)'
47        mkdir -p '$(DESTDIR)$(PREFIX_INC)'
48        mkdir -p '$(DESTDIR)$(PREFIX_MAN)'
49        mkdir -p '$(DESTDIR)$(PREFIX_PC)'
50        mkdir -p '$(DESTDIR)$(PREFIX_COMP_LIBS)'
51        mkdir -p '$(DESTDIR)$(PREFIX_COMP_BINS)'
52        mkdir -p '$(DESTDIR)$(PREFIX_CKPORT)'
53        mkdir -p '$(DESTDIR)$(PREFIX_PLUGINS)/universal/universal/$(DEV_VENDOR)-$(DEV_VENDOR_NAME)'
54        mkdir -p '$(DESTDIR)$(PREFIX_PLUGINS)/$(DEV_VENDOR)-$(DEV_VENDOR_NAME)/universal/'
55        mkdir -p '$(DESTDIR)$(PREFIX_PLUGINS)/$(DEV_VENDOR)-$(DEV_VENDOR_NAME)/roard/$(DEV_VENDOR)-$(DEV_VENDOR_NAME)'
56        mkdir -p '$(DESTDIR)$(PREFIX_BUILDSYSTEM)'
57        set -e; cd doc; $(MAKE) prep-install-dirs; cd ..
58
59install: prep-install
60        cp $(cp_v) lib/roar*     '$(DESTDIR)$(PREFIX_BIN)'
61        cp $(cp_v) $(CKPORTDB)   '$(DESTDIR)$(PREFIX_CKPORT)'
62        set -e; if [ "$(CROSS_COMPILE)" = "false" -o "$(CROSS_COMPILE)" = "true" -a "$(EXEC_HELPER)" != "" ]; then cp $(cp_v) lib/*.pc      '$(DESTDIR)$(PREFIX_PC)'; fi
63        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do cp $$file '$(DESTDIR)$(PREFIX_LIB)'/$$file.$(COMMON_SOVERSION); done'
64        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs $(SYMLINKPREFIX)$$file.$(COMMON_SOVERSION) '$(DESTDIR)$(PREFIX_LIB)'/$$file; done'
65        sh -c 'set -e; cd lib; while read d t; do if [ -e '$(DESTDIR)$(PREFIX_LIB)'/$$d$(SUFFIX_LIB) ]; then ln -fs '$(SYMLINKPREFIX_ROOT)$(PREFIX_LIB)'/$$d$(SUFFIX_LIB) '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; fi; done < ../symlinks.comp'
66        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'
67        sh -c 'set -e; for file in include/roar* include/lib*; do cp $(cp_v) -r $$file '$(DESTDIR)$(PREFIX_INC)'/; done'
68        set -e; cd doc; $(MAKE) install; cd ..
69        set -e; for i in $(PLUGINS); do if [ "$$i" != '' ]; then cd $$i; $(MAKE) install; cd ../..; fi; done
70        cp $(cp_v) build-system/*.*     '$(DESTDIR)$(PREFIX_BUILDSYSTEM)'
71
72semi-install: prep-install
73        sh -c 'set -e; for file in lib/roar*;    do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_BIN)'/; done'
74        ln -fs `pwd`/$(CKPORTDB) '$(DESTDIR)$(PREFIX_CKPORT)/'
75        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'
76        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/; done'
77        sh -c 'set -e; cd lib; for file in lib*$(SHARED_SUFFIX)*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_LIB)'/$$file.$(COMMON_SOVERSION); done'
78        sh -c 'set -e; cd lib; while read d t; do if [ -e `pwd`/$$d$(SHARED_SUFFIX) ]; then ln -fs `pwd`/$$d$(SHARED_SUFFIX) '$(DESTDIR)$(PREFIX_COMP_LIBS)'/$$t; fi; done < ../symlinks.comp'
79        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'
80        sh -c 'set -e; for file in include/roar* include/lib*; do ln -fs `pwd`/$$file '$(DESTDIR)$(PREFIX_INC)'/; done'
81        set -e; cd doc; $(MAKE) semi-install; cd ..
82        set -e; for i in $(PLUGINS); do if [ "$$i" != '' ]; then cd $$i; $(MAKE) semi-install; cd ../..; fi; done
83        ln -fs `pwd`/build-system/*.* '$(DESTDIR)$(PREFIX_BUILDSYSTEM)'
Note: See TracBrowser for help on using the repository browser.