
              Brutus C sample/test README
         Copyright (C) 2004-2008 OMC Denmark ApS.


Your rights
===========

Copying and distribution of this file, with or without 
modification, are permitted in any medium without royalty 
provided the copyright notice and this notice are preserved.
                

Introduction
============

This directory holds C sample/test source code for the 
Brutus framework.

Any and all code is written for clarity, not performance or 
smartness. If there is two ways to do things, the clever way 
and the obvious way, then the obvious way is chosen.

The Makefiles are written the same way, allthough there are 
most likely better and clearer ways to write the Makefiles. 

I am not exactly a GNU make guru, so there are undoubtly many 
silly and stupid mistakes in those Makefiles, but they work.
Please submit patches to fix this (hint, hint..).

Please visit <http://www.42tools.com/> for more information.


License
=======

All sample/test code is distributed under the terms the GNU 
General Public License. Please see the file COPYING for the 
specifics.


External dependencies
=====================

 CORBA:
     The C sample/test project is written for the ORBit2 CORBA 
     implementation. The required versions of ORBit2 and libIDL 
     are:

	ORBit2 2.14.16 or never.	       
	libIDL 0.8.5 or never.

 Operating system:
     All of the projects has been verified to work under Fedora 
     Core 1, 2 and 3. It is possible and very likely that other 
     Linux distributions and UNIX like operating systems will
     work equally well as long as the GNU tool chain is 
     available. You will propably need to make adjustments to 
     the Makefiles though. YMMV.


Sub projects
============

The folowing sub projects lives in similar name directories 
directly under the C top level directory (in which you are 
reading this README):

 client:
     Source code for the sample/test executable lives here.

 config:
     Source code for a helper class to read the configuration 
     file.

 get_logon_object:
     A helper class to retrieve a CORBA reference to a Brutus 
     logon object (BrutusLogOn).

 init_orb:
     A helper class to call ORB_init() with the correct command 
     line arguments.


How to build
============

Simply issue "make stubs && make" in the C top level directory. 

"make stubs" will rebuild all of the IDL files. The client stubs
and server skeleton objects will also be build by this target. 

The client stub objects are all linked into the client executable, 
to make it as easy as possible to add new functionallity without
Makefile modifications.

There are individual Makefiles in all sub directories.

There is currently no mechanism in the "client" Makefile to detect
modified source files on which the client executable depends. You 
must rebuild the object files manually for all modified external 
source files. A patch to rectify this obvious limitation will be 
very welcome.


Make targets
============

stubs:      All IDL files are recompiled. Client stub and server 
            skeleton objects are build from the generated files.
            Depends on target "idl". 

all:        All sample code are build and linked against all client
            stub objects and those few server skeleton objects that 
            are strictly needed. It does *not* depend on target 
            "stubs". It is rather rare that the IDL files are 
            modified and it would therefore be unbearably time 
            consuming and burdensome to rebuild all client stubs 
            and server skeletons for each "make" or "make all". 
 
idl:        All IDL files are recompiled.

clean:      Will run "make clean" in all sub directories.

clean_idl:  Will remove all generated files in the IDL output 
            directory including object files.

very_clean: No actions on its own. Depends on "clean" and 
            "very_clean". 


Tips and troubleshooting
========================

Please see the README for the top level sample directory. C 
specific questions, currently none, are answered here.


-- 
  Jules Colding
  colding@42tools.com
