Adding an example application

The easy way

The easiest way to add an example-application to Mimas is to duplicate the mimas/examples/blob directory and start modifying the files. If you are working with gnu-arch/tla, DO NOT COPY the directory `.arch-ids', which contains the file-ids.

Adapt the file examples/xyzpqr/Makefile.am:

    xyzpqrdir=@datadir@/doc/@PACKAGE@-devel-@VERSION@/examples/xyzpqr
    xyzpqr_PROGRAMS = xyzpqr

    xyzpqr_SOURCES = main.cc
    xyzpqr_LDFLAGS =
    xyzpqr_LDADD = ../../lib/libmimas.la
    ...
    

Add the examples to the subdirectory list of the build-file examples/Makefile.am:

    SUBDIRS= ... xyzpqr
    

Add a rule to the configure-script for generating the Makefile automatically by adding an AC_OUTPUT-entry to the file configure.in:

    AC_OUTPUT( ... \
    examples/xyzpqr/Makefile)
    

Change to the root-directory of mimas and ceate the new configure-script and Makefile.in by executing make -f Makefile.dist (this will call autoconf and automake). Also rerun ./configure for automatically creating the makefile examples/xyzpqr/Makefile.

Start working on main.cc. Compile using make.

The Makefiles are configured such that the binary generated is the name of the directory, so for example typing make in the examples/xyzpqr directory would generate a binary called xyzpqr.

Also see documentation of gnu-arch.


[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:17 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...