################################################################################ # Squeezeplay makefile for Linux # Copyright 2007 Logitech ################################################################################ # # Absolute path to top of SQUEEZEPLAY directories # SRC_DIR = $(realpath ${PWD}) BASE_DIR = $(dir ${SRC_DIR}) export BUILD_TOP=$(BASE_DIR)/build/linux DESTDIR=${BUILD_TOP} export PREFIX=${DESTDIR} export CFLAGS=-I${PREFIX}/include -I${PREFIX}/include/SDL -I${PREFIX}/include/freetype2 -g export LDFLAGS=-L${PREFIX}/lib export TOOLPATH = $(shell dirname `which gcc`) export SDL_CONFIG = ${BUILD_TOP}/bin/sdl-config ENABLE_PROFILING=--enable-profiling --disable-shared USE_MMX=--disable-mmx # # Top level targets # .PHONY: all all: sdl-all lua-all app ##### # SDL ##### .PHONY: sdl-all freetype sdl sdl-image sdl-tff sdl-gfx c-ares sdl-all: freetype sdl sdl-ttf sdl-image sdl-gfx # freetype freetype-2.1.10/config.mk: cd freetype-2.1.10; ./configure --enable-shared ${ENABLE_PROFILING} --host=${TARGET} --target=${TARGET} --prefix=${PREFIX} freetype: freetype-2.1.10/config.mk cd freetype-2.1.10; make; make install # sdl SDL-1.2.13/Makefile: cd SDL-1.2.13; ./configure ${ENABLE_PROFILING} --prefix=${PREFIX} sdl: SDL-1.2.13/Makefile cd SDL-1.2.13; make && make install # sdl_image (requires jpeg tiff png) SDL_image-1.2.5/Makefile: cd SDL_image-1.2.5; SDL_CONFIG=${PREFIX}/bin/sdl-config ./configure --disable-tif ${ENABLE_PROFILING} --prefix=${PREFIX} sdl-image: SDL_image-1.2.5/Makefile cd SDL_image-1.2.5; make && make install # sdl_ttf SDL_ttf-2.0.8/Makefile: cd SDL_ttf-2.0.8; SDL_CONFIG=${PREFIX}/bin/sdl-config ./configure ${ENABLE_PROFILING} --prefix=${PREFIX} --with-freetype-prefix=${PREFIX} --without-opengl sdl-ttf: SDL_ttf-2.0.8/Makefile cd SDL_ttf-2.0.8; make && make install # sdl_gfx SDL_gfx-2.0.15/Makefile: cd SDL_gfx-2.0.15; ./configure ${ENABLE_PROFILING} ${USE_MMX} --prefix=${PREFIX} sdl-gfx: SDL_gfx-2.0.15/Makefile cd SDL_gfx-2.0.15; make && make install ##### # lua ##### .PHONY: lua-all lua luasocket slnunicode luajson loop lualogging luaexpat luafilesystem luaprofiler luazipfilter lua-all: lua tolua++ luasocket slnunicode luajson loop lualogging luaexpat luafilesystem luaprofiler luazipfilter # lua (requires readline ncurses) lua: cd lua-5.1.1; make linux INSTALL_TOP=${PREFIX} && make install INSTALL_TOP=${PREFIX} # luasocket (requires lua) luasocket: lua cd luasocket-2.0.1; make install LD="gcc -shared" INSTALL_TOP=${PREFIX} TARGET=$(TARGET) PLATFORM=linux slnunicode: lua cd slnunicode-1.1; make install INSTALL_TOP=${PREFIX} TARGET=$(TARGET) PLATFORM=linux luajson/Makefile: cd luajson; ./configure --prefix=${PREFIX} luajson: luajson/Makefile cd luajson; make && cp .libs/json.so ${PREFIX}/lib/lua/5.1/json.so luazipfilter/Makefile: cd luazipfilter; ./configure --prefix=${PREFIX} luazipfilter: luazipfilter/Makefile cd luazipfilter; make && cp .libs/zipfilter.so ${PREFIX}/lib/lua/5.1/zipfilter.so loop: -mkdir ${PREFIX}/share/lua/5.1/loop -mkdir ${PREFIX}/share/lua/5.1/loop/collection -mkdir ${PREFIX}/share/lua/5.1/loop/debug cd loop-2.2-alpha; install loop/base.lua ${PREFIX}/share/lua/5.1/loop/. cd loop-2.2-alpha; install loop/simple.lua ${PREFIX}/share/lua/5.1/loop/. cd loop-2.2-alpha; install loop/table.lua ${PREFIX}/share/lua/5.1/loop/. cd loop-2.2-alpha; install loop/collection/ObjectCache.lua ${PREFIX}/share/lua/5.1/loop/collection/. cd loop-2.2-alpha; install loop/debug/Viewer.lua ${PREFIX}/share/lua/5.1/loop/debug/. lualogging: cd lualogging-1.1.2; make install LUA_DIR=${PREFIX}/share/lua/5.1 luaexpat: lua cd luaexpat-1.0.2; make PREFIX=${PREFIX} PLATFORM=linux && make install PREFIX=${PREFIX} PLATFORM=linux luafilesystem: cd luafilesystem-1.2 && make install PREFIX=${PREFIX} PLATFORM=linux luaprofiler: cd luaprofiler-2.0 && make -f Makefile.linux install # just compile the library for to tolua++ .PHONY: tolua++ tolua++: lua cd tolua++-1.0.92/src/lib; ${CC} -shared -fPIC -o libtolua++.so -I../../include -I${PREFIX}/include *.c mkdir -p ${PREFIX}/lib install tolua++-1.0.92/include/tolua++.h ${PREFIX}/include install tolua++-1.0.92/src/lib/libtolua++.so ${PREFIX}/lib # # squeezeplay # .PHONY: app portaudio flac libmad tremor squeezeplay squeezeplay_desktop squeezeplay_contrib freefont freefont-debian app: portaudio flac libmad tremor squeezeplay squeezeplay_desktop squeezeplay_contrib freefont squeezeplay-tgz # portaudio portaudio_v19_1360/Makefile: cd portaudio_v19_1360; ./configure --prefix=${PREFIX} portaudio: portaudio_v19_1360/Makefile cd portaudio_v19_1360; make && make install # flac flac-1.2.1/Makefile: cd flac-1.2.1; ./configure --disable-ogg --disable-xmms-plugin --prefix=${PREFIX} flac: flac-1.2.1/Makefile cd flac-1.2.1; make && make install # libmad libmad-0.15.1b/Makefile: cd libmad-0.15.1b; ./configure --prefix=${PREFIX} libmad: libmad-0.15.1b/Makefile cd libmad-0.15.1b; make && make install # ogg Tremor/Makefile: cd Tremor; ./configure --prefix=${PREFIX} tremor: Tremor/Makefile cd Tremor; make && make install # squeezeplay squeezeplay/Makefile: cd squeezeplay; SDL_CONFIG=${SDL_CONFIG} ./configure ${ENABLE_PROFILING} --prefix=${PREFIX} squeezeplay: squeezeplay/Makefile cd squeezeplay; make && make install squeezeplay_desktop/Makefile: cd squeezeplay_desktop; SDL_CONFIG=${SDL_CONFIG} ./configure --prefix=${PREFIX} squeezeplay_desktop: squeezeplay_desktop/Makefile cd squeezeplay_desktop; make install squeezeplay_contrib: squeezeplay/Makefile cd squeezeplay_contrib; make PREFIX=${PREFIX} # freefont freefont: mkdir -p ${PREFIX}/share/jive/fonts cp freefont-20060126/FreeSans.ttf ${PREFIX}/share/jive/fonts cp freefont-20060126/FreeSansBold.ttf ${PREFIX}/share/jive/fonts # fonts for clock screensaver cp fonts-clock/Digital.ttf ${PREFIX}/share/jive/fonts cp fonts-clock/DigitalItalic.ttf ${PREFIX}/share/jive/fonts # # This builds the .tarball. It's called by 'all' so no need to run it manually # squeezeplay-tgz: squeezeplay/Makefile cd squeezeplay; make squeezeplay-tgz # # Allow user to call the -deb build and it runs both the 'all' and then packages it # .PHONY: squeezeplay-deb squeezeplay-deb: all squeezeplay-deb-make squeezeplay-deb-make: squeezeplay/Makefile cd squeezeplay; make squeezeplay-deb # # clean # .PHONY: clean clean: -cd freetype-2.1.10; make distclean -cd SDL-1.2.13; make distclean; rm -f include/SDL_config.h; -cd SDL_image-1.2.5; make distclean -cd SDL_ttf-2.0.8; make distclean -cd SDL_gfx-2.0.15; make distclean -cd lua-5.1.1; make clean -cd luasocket-2.0.1; make clean PLATFORM=linux -cd slnunicode-1.1; make clean PLATFORM=linux -cd luaexpat-1.0.2; make clean PLATFORM=linux -cd luafilesystem-1.2; make clean PLATFORM=linux -cd luajson; make distclean -cd luazipfilter; make distclean -cd luaprofiler-2.0; make -f Makefile.linux clean -cd tolua++-1.0.92/src/lib; rm libtolua++.so; rm *.o -cd squeezeplay; make distclean