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.