Makefile (2443B)
1 # pressureaudio - take the pressure out of pulseaudio 2 # See LICENSE file for copyright and license details. 3 4 include config.mk 5 6 SRC = catpoint.c 7 OBJ = ${SRC:.c=.o} 8 9 all: options apulse pulseaudio headers pkgconfig 10 11 options: 12 @echo pressureaudio build options: 13 @echo "APULSEREPO = ${APULSEREPO}" 14 @echo "PULSEREPO = ${PULSEREPO}" 15 16 apulse: 17 @echo checking out the apulse repository 18 @mkdir -p apulse 19 @if [ ! -e apulse/.git ]; \ 20 then \ 21 git clone ${APULSEREPO} apulse; \ 22 else \ 23 cd apulse && git pull; \ 24 fi 25 @echo building apulse 26 @cd apulse \ 27 && mkdir -p build \ 28 && cd build \ 29 && cmake \ 30 -DCMAKE_INSTALL_PREFIX=${PREFIX} \ 31 -DCMAKE_BUILD_TYPE=Release .. \ 32 && make 33 34 pulseaudio: 35 @echo checking out the pulseaudio repository 36 @mkdir -p pulseaudio 37 @if [ ! -e pulseaudio/.git ]; \ 38 then \ 39 git clone ${PULSEREPO} pulseaudio; \ 40 else \ 41 cd pulseaudio && git pull; \ 42 fi 43 @echo running autogen.sh in the pulseaudio dir to generate files 44 @cd pulseaudio && ./autogen.sh --prefix=${PREFIX} 45 46 headers: pulseaudio 47 @echo copying over the pulseaudio headers for installation 48 @mkdir -p include/pulse 49 @cp pulseaudio/src/pulse/*.h include/pulse 50 51 pkgconfig: 52 @echo copying over the pulseaudio pkg-config pc files 53 @mkdir -p pkgconfig 54 @cp pulseaudio/*.pc pkgconfig 55 56 clean: 57 @echo cleaning 58 @rm -rf apulse pulseaudio include/pulse/* pkgconfig/* pressureaudio-${VERSION}.tar.gz 59 @mkdir -p apulse pulseaudio 60 61 dist: clean 62 @echo creating dist tarball 63 @mkdir -p pressureaudio-${VERSION} 64 @cp -R LICENSE Makefile README.md config.mk apulse include pkgconfig pulseaudio \ 65 pressureaudio-${VERSION} 66 @tar -cf pressureaudio-${VERSION}.tar pressureaudio-${VERSION} 67 @gzip pressureaudio-${VERSION}.tar 68 @rm -rf pressureaudio-${VERSION} 69 70 install: all 71 @echo installing apulse 72 @cd apulse/build && make install 73 @echo installing include files 74 @mkdir -p ${DESTDIR}${PREFIX}/include/pulse 75 @cp -f include/pulse/*.h ${DESTDIR}${PREFIX}/include/pulse 76 @echo installing pkg-config pc files 77 @mkdir -p ${DESTDIR}${PREFIX}/lib/pkgconfig 78 @cp -f pkgconfig/*.pc ${DESTDIR}${PREFIX}/lib/pkgconfig 79 80 uninstall: 81 @echo removing apulse requires you to look into the apulse distribution 82 @echo removing pulseaudio include files 83 @rm -rf ${DESTDIR}${PREFIX}/include/pulse 84 @echo removing pulseaudio pkg-config pc files 85 @rm -f ${DESTDIR}${PREFIX}/lib/pkgconfig/libpulse*pc 86 87 .PHONY: all options clean dist install uninstall pulseaudio apulse pkgconfig include 88