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