In order to compile fminuit from sources, open a command shell, and
 
1) change directory to ./fminuit (./fminuit is the directory where fminuit.c 
is stored);

2) edit the top of the Makefile.* corresponding to the desired target architecture and Matlab version/clone as appropriate, in order to reflect where Matlab (Scilab, Octave) is installed, and its version numbers.

3) Compile with 
 make -f Makefile.XXX.YYY
or (openWatcom for Windows)
 wmake -f Makefile.XXX.YYY
(here Makefile.XXX.YYY stands for the appropriate makefile). Alternatively, copy/symlink Makefile.XXX.YYY to Makefile, and run make (wmake) with no argument.

4) Optionally, run 
 make -f Makefile.XXX.YYY install
to have fminuit.mex* (.dll) and accompanying scripts copied into a subdirectory of ./bin


Supported platforms and versions.

1) Linux (both 32 and 64 bit), with native gcc compiler. Usage of g77 fortran to compile minuit code is maintained for sake of code optimizations (performance benefit is hardly noticeable, however), and it is signalled by *the g77* suffix in Makefile.*. G77 is going to be abandoned in favour of gfortran, which is not supported (and probably won't ever be, due the i/o wrapping issue), so the only portable way of building fminuit is using f2c-translated minuit code, which is default.
- Matlab Release 12 (6.x) to R2009B (7.7) and possibly higher: mex file extension is .mexglx (32bit), .mexa64 (64bit). Use Makefile.R1-R2009B_g77.lnx or Makefile.R1-R2009B_f2c.lnx (see above).
- Octave version 2.1.x to 3.2.x (and possibly higher): mex file extension is .mex. Use Makefile.f2c_lnx.Octave 
 NB: building fmuinit for Octave versions prior to 2.3.x (?) requires additional mexlib package supplied by Octave-forge 
- Scilab version 2.5 up to 4.x: binary file fminuit.scimex (relocatable object). Use Makefile.scilabV2to4.g77.lnx (g77-compiled minuit) or Makefile.scilabV2to4.f2c.lnx (f2c based).
- Scilab version 4.x up to 5.x: binary file libfminuit.so (shared object). Use 
Makefile.f2c_lnx.ScilabV4to5. 

2) Windows 32bit. Compile with OpenWatcom 1.6 or higher. 
 - Matlab Release 11 (5.3) to Matlab Release 14 (7.1) and any version prior to R2006B: mex file extension is .dll. Use Makefile.OpenWatcom.Mlb6. 
 - Matlab Release 2006B (7.3) or higher: mex file extension is .mexw32. Use Makefile.OpenWatcom.
  
3) MacOsX, gcc compiler. 
 - Matlab Release R14 (7.1) or higher: mex file extension is .mexmaci (Intel-based OS), .mexmac (powerPC). Use Makefile.maci (Intel), Makefile.mac (powerPC).
