1 # This Makefile is specifically tailored for the binaries of this tutorial.
\r
3 # For your own project, you should use the one provided at
\r
4 # http://simgrid.gforge.inria.fr/simgrid/latest/doc/install_yours.html
\r
7 SIMGRID_INSTALL_PATH = /opt/simgrid # Where you installed simgrid
\r
8 CC = gcc # Your compiler (on Mac, use clang instead)
\r
10 # No change needed bellow for this tutorial.
\r
11 ############################################################################
\r
13 all: masterworker1 masterworker2 masterworker3 masterworker4
\r
14 masterworker1: masterworker1.o
\r
15 masterworker2: masterworker2.o
\r
16 masterworker3: masterworker3.o
\r
17 masterworker4: masterworker4.o
\r
19 WARNING = -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \
\r
20 -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes \
\r
21 -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls \
\r
22 -Wnested-externs -Wpointer-arith -Wwrite-strings
\r
24 # CFLAGS = -g -O0 $(WARNINGS) # Use this line to make debugging easier
\r
25 CFLAGS = -g -O2 $(WARNINGS) # Use this line to get better performance
\r
27 # No change should be mandated past that line
\r
28 #############################################
\r
29 # The following are implicit rules, used by default to actually build
\r
30 # the targets for which you listed the dependencies above.
\r
32 # The blanks before the $(CC) must be a Tab char, not spaces
\r
34 $(CC) -L$(strip $(SIMGRID_INSTALL_PATH))/lib/ $(CFLAGS) $^ -lsimgrid -o $@
\r
36 $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include $(CFLAGS) -c -o $@ $<
\r