-\endverbatim
-
-\section install_setting_own Setting up your own code
-
-\subsection install_setting_MSG MSG code on Unix
-
-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
-all: masterslave
-masterslave: masterslave.o sched.o
-
-INSTALL_PATH = $$HOME
-CC = gcc
-PEDANTIC_PARANOID_FREAK = -O0 -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
-REASONABLY_CAREFUL_DUDE = -Wall
-NO_PRAYER_FOR_THE_WICKED = -w -O2
-WARNINGS = $(REASONABLY_CAREFUL_DUDE)
-CFLAGS = -g $(WARNINGS)
-
-INCLUDES = -I$(INSTALL_PATH)/include
-DEFS = -L$(INSTALL_PATH)/lib/
-LDADD = -lm -lsimgrid
-LIBS =
-
-%: %.o
- $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@
-
-%.o: %.c
- $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $<
-
-clean:
- rm -f $(BIN_FILES) *.o *~
-.SUFFIXES:
-.PHONY: clean
-
-\endverbatim
-
-The first two lines indicates what should be build when typing make
-(<tt>masterslave</tt>) and of which files it is to be made of
-(<tt>masterslave.o</tt> and <tt>sched.o</tt>). This makefile assumes
-that you have set up correctly your <tt>LD_LIBRARY_PATH</tt> variable
-(look, there is a <tt>LDADD = -lm -lsimgrid</tt>). If you prefer using
-the static version, remove the <tt>-lsimgrid</tt> and add a
-<tt>$(INSTALL_PATH)/lib/libsimgrid.a</tt> on the next line, right
-after the <tt>LIBS = </tt>.
-
-More generally, if you have never written a Makefile by yourself, type
-in a terminal: <tt>info make</tt> and read the introduction. The
-previous example should be enough for a first try but you may want to
-perform some more complex compilations...
-