Janos Configuration/Build Makefiles ----------------------------------- Since Janos is made from several separate, inter-dependent components, building it is complex. The configuration file in this directory is meant to ease the process. Instructions ------------ 1) Edit 'default.cfg'. Read the comments and change the required variables, typically, you shouldn't have to change anything except COMPONENTS. You might have to edit _SRC_DIR, if the component isn't under the "src" subdirectory or there is more than one version in "src". (E.g., if you kee the oskit in ~/src/oskit, you should change the definition of 'oskit_SRC_DIR' in default.cfg.) You can change the 'COMPONENTS' variable at the top of default.cfg to build different subsets of Janos. MOAB NOTES: If you're building moab, you'll want to edit the 'moab_HOST' variable in the configuration file to indicate if moab is being built to run on the "real" OSKit, unixmode OSKit, or vanilla Unix. JANOSVM NOTES: For the JanosVM, configure-time options for the engine and the library linking are set in this file, too. Also, if you're cross-compiling the JanosVM for the OSKit, then you'll need to add the janosvmtools component or define the 'janosvm_LOCAL_KAFFEH' and 'janosvm_LOCAL_JSIHEY' variables. These specify unix compiled versions of the tools for generating C headers from Java classes and a communication tool, respectively. JNODEOS/ANTS NOTES: For building either of the pure-java components (i.e., and not including JanosVM), you'll need to tell the Makefiles where your standard Java classes are (e.g., classes.zip). Set that through the 'JVM_CORE_CLASSES' variable. Longer term, you'll want to copy default.cfg to purejava.cfg, or fulljanos.cfg, or whatever, and run make with CONFIG_FILE=whatever.cfg. You can leave the INSTALL_DIR and OBJ_DIR the same in all of these configuration files, as builds will be shared where it makes sense to share them. 2) Use the GNUmakefile Generally: 'make -' is what you want. For example: 'make oskit-config' or 'make janosvm-relink' Try 'make -help' to get "help" on that component, for example: 'make janosvm-help' You can combine multiple targets in one make: 'make oskit-config oskit-all oskit-install' or 'make oskit-install moab-install janosvm-relink' All the components (oskit click moab janosvm jnodeos antsr) support any of the following targets: all install clean config realclean reconf mkdebug patch unpatch ('mkdebug' just prints out debugging information about these makefiles.) The patch and unpatch targets are a handy way of apply patches to the components. Simply, download any patches into the janos/patches subdirectory and run the 'make -patch' command. Then, any patch files found with the name '-.patch' will be applied and moved to the janos/patches-applied subdirectory. You can also remove the patches using 'make -unpatch', however, this will remove all patches found in the directory. If you only want to patch/unpatch a single file you'll need to set the PATCH_FILE variable on the command line. For example, 'make oskit-unpatch PATCH_FILE=oskit-misc.patch'. There are two special targets 'universe' and 'newuniverse' which rebuild each component in sequence. 'universe' just does a -all -install for each component, while 'newuniverse' first realcleans, and then re-configures each component. Use the 'WAY=debug|optimized|profile' command line variable setting on the make command line to change the "way" Janos is compiled (debugging symbols, optimized, or with profiling). Note that you can always just cd into the appropriate object directory for a component and run `make ', `./config.status', etc. These Janos makefiles do not *require* that you use them for build, install, etc. If you're building a standalone Janos system (oskit/moab/janosvm/jnodeos) then you can create an Image file that is bootable with the oskit's netboot using the 'make janos-bmod' target. 3) Use the duplibs script duplibs is a utlility script, written in Python (and requiring version 2.0 or better), which will examine the various copies of the different class archives that Janos requires, and update all of the copies to the most recent one found. To run it simply type ./duplibs in the janos directory. It will read in the defaults.cfg and run a _simple_ makefile interpret over it. This is liable to break if anything peculiar is done in the defaults.cfg, but as long as only simple variable substituion is used, then it should work. If you are using a different configuration file, either change the global variable configfile declared at the top of the file, or pass CONFIG_FILE=whatever.cfg to it. This script should be run at the user's descetion, whenever they think that a copy of a required class archive may be out-of-date. It is best run _between_ various steps of the janos makefiles. For instance, building the janosvm, then running duplibs to get the janosvm archives copied correctly, then building the jnodeos, running duplibs, and, finally, build ants. Note that this script is very dependent on directory structures to find the various copies of the class archives. Thus, if any of these structures are changed, duplibs should be updated appropriately. It will issue warnings if it cannot find the files that it expects to find, so watch out for these. If all else fails, perform a find command in the roots of the source trees, the object trees, and the install trees to find the various libraries. But when updating the lists of source files in the script, be careful to use the necessary make expansions (i.e. from the $WAY variable, etc). SHORTCOMINGS ------------ Inter-component dependencies are not handled. For example, if you rebuild the OSKit because you fixed a bug in the console initialization code, you will have to relink the OSKit libraries into your kernels: 'make janosvm-relink' if you're using the JanosVM. 'make moab-install' if you're using one of Moab's example EEs.