I will try to draw some general steps that you can follow:
You will need to decompress your mp3 files into raw audio. Depending
on what kind of application you are developing you could use
madlib (GPL) or ffmpeg (LGPL) for example.
You will need to normalize all your tracks into the same frequency
(re-sampling), and decide on an output bit-depth.
Now you can mix all your tracks. Assuming that you have 2 channels,
the basic idea is to compute an average of all samples of the right
channel of your tracks, then do the same with the left channel.
There are many approaches for this and here you will have to decide on
a trade-off in performance/quality for your results. For
example some developers will prefer to do the mix operation on float
point, in order to deal with clipping (d)effects, but others
may advise against it because it affects performance. There is a
good post about integer-based mixing here (it has been
referenced several times in SO). Also before (or during) this step you could implement some audio normalization process by using a multiplier on the samples of the channel that you want to normalize.
Finally you can compress your mixed audio again. You could use
lame for example on this task, or ffmpeg one more time.
There are many DSP packages for linux out there that might do several (or all) of these steps for you. One GPL project that comes to my mind is VLC (VideoLan Client). You could try to call it as an external process or schedule it with VLM (VideoLan Manager). From the documentation:
Scheduled broadcasting:
new my_media broadcast enabled
setup my_media input my_video.mpeg input my_other_movie.mpeg
setup my_media output #rtp{mux=ts,dst=239.255.1.1,sdp=sap://,name="My Media"}
Naturally, the output stream in VLC can also be a local file.
Edit:
I also found a question on SO where the accepted answer can be useful to you, it recommends using Sox. From the homepage:
SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line
utility that can convert various formats of computer audio files in to
other formats. It can also apply various effects to these sound
files(...)