Revised Makefile & Makefile.inc
Brian Rice
water at tunes.org
Sat Sep 3 09:34:04 PDT 2005
Ah, this automates a lot of our tasks. Thank you! I've incorporate it
into our main repositories. :)
On Sep 3, 2005, at 3:31 AM, Nick Forde wrote:
> I've rewritten the Slate makefiles to be a bit more powerful and
> portable without resorting to using Autoconf. In particular the VM is
> now built directly from the top-level and hence libtool is only
> required to build the plug-ins. A byte order test is also included so
> that the correct alpha image will be automatically downloaded and it
> is now easier to bootstrap and run the regression tests.
>
> I've tried to maintain compatibility with the old makefiles but as I
> only have access to UNIX derivatives (OSX, Linux, Solaris, AIX, HP-UX)
> I'd appreciate if others on the list could try the attached files
> to see whether I've broken anything. I'm sure some tweaking will
> be required.
>
> The variables and rules follow the GNU standards pretty closely so if
> in future it becomes necessary to take the target CPU into account it
> should be relatively easy to reuse this with Autoconf.
>
> Suggestions for improvements and new targets would be greatly
> appreciated. Some more notes can be found below.
>
> Thanks,
>
> Nick.
>
>
> Prerequisites
> -------------
>
> - GNU Compiler Collection (http://gcc.gnu.org/)
> - GNU Make (http://www.gnu.org/software/make/)
> - GNU Wget (http://www.gnu.org/software/wget/wget.html) *
> - GNU Libtool (http://www.gnu.org/software/libtool/libtool.html) **
> - POSIX compatible 'uname', 'cp' and 'echo'.
>
> To debug and profile the virtual machine the makefiles are
> configured for:
>
> - GNU Debugger (http://www.gnu.org/software/gdb/gdb.html)
> - GNU Profiler (http://www.gnu.org/software/binutils/manual/
> gprof-2.9.1/gprof.html)
>
> * Only necessary to automatically download the latest alpha VM
> source code and bootstrap images from http://slate.tunes.org/
> repos/alpha
>
> ** Required to build the plug-in shared libraries.
>
> Build Targets
> -------------
>
> build - Compiles the virtual machine (default rule).
> bootstrap - Compiles the VM and generates an initial image
> (slate.image).
> newboot - Runs fullCleanBootstrap.
> plugins - Recursively runs make on each of the plugin directories.
> check - Runs the regressions tests (tests/*.slate).
> clean - Removes the VM temporary files.
> distclean - As above but also runs clean on each of the plugin
> directories.
>
> Environment Variables
> ---------------------
>
> VERBOSE=1 : Echo all commands with their arguments
> PROFILE=1 : Use the GCC -pg argument to profile the VM with gprof.
> DEBUG=1 : Enable debugging symbols
>
> Miscellaneous
> -------------
>
> There are now VERSION and BYTE_ORDER variables defined in Makefile.inc
> which are passed as defines when compiling the VM. Workarounds to
> compile/run on OSX Tiger(G4) and Solaris are also included.
>
> Examples
> --------
>
> # Download and build the alpha VM and a new slate.image
> $ gmake bootstrap
>
> # Debug the VM using gdb
> $ gmake DEBUG=1 bootstrap
> $ gdb vm
>
> # Profile the VM for a slate session
> $ gmake PROFILE=1 bootstrap
> $ vm
> $ gprof vm gmon.out
>
>
>
> <Makefile>
> <Makefile.inc>
>
--
-Brian
More information about the Slate
mailing list