-\endverbatim
-
-\section install_setting_own Setting up your own code
-
-Do not build your simulator by modifying the SimGrid examples. Go
-outside the SimGrid source tree and create your own working directory
-(say <tt>/home/joe/SimGrid/MyFirstScheduler/</tt>).
-
-Suppose your simulation has the following structure (remember it is
-just an example to illustrate a possible way to compile everything;
-feel free to organize it as you want).
-
-\li <tt>sched.h</tt>: a description of the core of the
- scheduler (i.e. which functions are can be used by the
- agents). For example we could find the following functions
- (master, forwarder, slave).
-\li <tt>sched.c</tt>: a C file including <tt>sched.h</tt> and
- implementing the core of the scheduler. Most of these
- functions use the MSG functions defined in section \ref
- msg_task_usage.
-\li <tt>masterslave.c</tt>: a C file with the main function, i.e.
- the MSG initialization (MSG_init()), the platform
- creation (e.g. with MSG_create_environment()), the
- deployment phase (e.g. with MSG_function_register() and
- MSG_launch_application()) and the call to MSG_main()).
-
-To compile such a program, we suggest to use the following
-Makefile. It is a generic Makefile that we have used many times with
-our students when we teach the C language.
-
-\verbatim
-# The first rule of a Makefile is the default target. It will be built when make is called with no parameter
-# Here, we want to build the binary 'masterslave'
-all: masterslave
-
-# This second rule lists the dependencies of the masterslave binary
-# How this dependencies are linked is described in an implicit rule below
-masterslave: masterslave.o sched.o
-
-# These third give the dependencies of the each source file
-masterslave.o: masterslave.c sched.h # list every .h that you use
-sched.o: sched.c sched.h
-
-# Some configuration
-SIMGRID_INSTALL_PATH = /opt/simgrid # Where you installed simgrid
-CC = gcc # Your compiler
-WARNING = -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \
- -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes \
- -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls \
- -Wnested-externs -Wpointer-arith -Wwrite-strings -finline-functions
-
-# CFLAGS = -g -O0 $(WARNINGS) # Use this line to make debugging easier
-CFLAGS = -g -O2 $(WARNINGS) # Use this line to get better performance
-
-# No change should be mandated past that line
-#############################################
-# The following are implicit rules, used by default to actually build
-# the targets for which you listed the dependencies above.
-
-# The blanks before the $(CC) must be a Tab char, not spaces
-%: %.o
- $(CC) -L$(SIMGRID_INSTALL_PATH)/lib/ $(CFLAGS) $^ -lsimgrid -o $@
-%.o: %.c
- $(CC) -I$(SIMGRID_INSTALL_PATH)/include $(CFLAGS) -c -o $@ $<
-
-clean:
- rm -f *.o *~
-.PHONY: clean
-\endverbatim
-
-The comments of this file should be enough to understand what's going
-on. If you are completely new to makefiles, you should install the
-<tt>make-doc</tt> package and type this command in a terminal:
-<tt>info make</tt>.
-
-Sometimes, the following error message (or similar) will be produced.
-@verbatim
-masterworker.c:209: undefined reference to `sg_version_check'
-masterworker.c:209: undefined reference to `MSG_init_nocheck'
-(and possibly many other undefined references)
-@endverbatim
-
-It means that the system does not manage to find simgrid when it tries
-to execute your programs. Specify where to search with the
-<tt>LD_LIBRARY_PATH</tt> variable. Try running the following command
-before executing your code. If it helps, you should add this line to
-your ~/.bashrc so that it gets executed each time you log into your
-computer.
-
-@verbatim
-export LD_LIBRARY_PATH=/opt/simgrid/lib
-@endverbatim
-
-@subsection install_src_32 Compiling a 32 bit version
-
-On a multiarch x86_64 Linux, it should be possible to compile a 32 bit
-version of SimGrid with something like:
-
-@verbatim
-CFLAGS=-m32 \
-CXXFLAGS=-m32 \
-PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig/ \
-cmake . \
--DCMAKE_SYSTEM_PROCESSOR=i386 \
--DCMAKE_Fortran_COMPILE=/some/path/to/i686-linux-gnu-gfortran \
--DGFORTRAN_EXE=/some/path/to/i686-linux-gnu-gfortran
-@endverbatim
-
-where i686-linux-gnu-gfortran can be implemented as:
-
-@verbatim
-#!/bin/sh
-exec gfortran -m32 "$@"