Rudimentary to-Mungi porting guide

By no means complete.

Instructions courtesy Balial (cgray@cse).

  1. You need a small patch to the Mungi makefile to create an 'extern.mk' target. "make extern.mk" produces extern.mk which among other things defines a target which includes all the paths to various include files in Mungi. There are heaps of them. :( Get the patch from me or Balial, but before you do just make sure that the target isn't already in your copy of Mungi. Hopefully Chuck has added it to CVS by the time you're reading this. :-)
  2. Add a couple of lines to the beginning of the Makefile for the port:
     ### Mungi Hack!
     MUNGIROOT := 
     include $(MUNGIROOT)/extern.mk
     
  3. Ensure that the compilation flags include:
     CFLAGS := .... $(MCFLAGS)
     INCLUDES := .... $(MINCLUDES)
     LDFLAGS := .... $(MLDFLAGS)
    
    ...where MCFLAGS, MINCLUDES and MLDFLAGS are defined in extern.mk which we included above.
  4. Cross fingers, type make and wait for things to break. I encountered a proble m where Mungi/lib/libc/std_include/machine/limits.h (included from ../limits.h) wasn't getting the definition of UINTPTR_BITS; putting #include at the top of the file seemed to work without too much ugliness. Perhaps there are more of these problems.