Instructions for Compiling Firefly from its source code

1. Install the broadcom toolset into /opt/brcm
2. export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin
3. export LDFLAGS=../lib
4. export CPPFLAGS=../include

You must start by building the dependencies of mt-daapd first. When you build these you will need to copy the .a and .so to a lib directory that you include in your LDFLAGS path, in my case it was one directory above the mt-daapd directory which is why my ldflags and cppflags point to the directory above in steps 3 and 4 above.
You must also copy these .h files from the projects below to a common include directory that will be included with the cppflags


For each of the these projects you must start by running the ./configure command with --host=mipsel-linux parameter and then run make

1. Build sqlite3-3.3.8 library
2. Build libid3tag-0.15.1b library
3. Build zlib-1.2.3 library
4. Build gdbm-1.8.3 library

Now you can compile the main mt-daapd project

you must run ./configure first with the correct parameters.  Here is the command line with parameters as I run it

./configure --host=mipsel-linux --enable-sqlite3 --with-id3tag --enable-mdns --with-static-libs=../lib ac_cv_func_setpgrp_void=yes

This should succeed so that you can now run make, however you now need to modify the source code in mt-daapd. To do this run

find . -print | xargs grep os_drop_privs

This will show you all places in the code where this variable is used.  Every occurrence of this variable must be commented out.  In some cases this is in an if statement and everything inside the if can be commented out as well.  This should now produce a mt-daapd that will run on the Media Vault.