-
Notifications
You must be signed in to change notification settings - Fork 299
Adding a new example
Dmitry Karpeyev edited this page Jun 2, 2015
·
15 revisions
There are a few "boilerplate" steps required when adding a new example.
- Choose a category which fits your example (adaptivity, adjoints, etc), create a new directory, and add the necessary source and header files.
- Copy a Makefile.am from one of the other examples (e.g. examples/adjoints/adjoints_ex1/Makefile.am) to your new example. Fill in the
install_dir,data, andCLEANFILESvariables with values relevant to your example. - Copy over a
run.shfrom one of the other examples (e.g. examples/adjoints/adjoints_ex1/run.sh) and update theexample_nameandexample_dirvariables appropriately. - Add a line to the
SUBDIRSvariable inexamples/Makefile.amfor your new example. - Add a line to the
AC_CONFIG_FILESsection of top-levelconfigure.acfor your new example. - Run
./bootstrapat the top level (it is best to use the bundledautotoolswhen bootstrapping):
PATH=`pwd`/contrib/autotools/bin:$PATH ./bootstrap