Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make these example files compile
[simgrid.git] / doc / msg-tuto-src / Makefile
diff --git a/doc/msg-tuto-src/Makefile b/doc/msg-tuto-src/Makefile
new file mode 100644 (file)
index 0000000..76f6084
--- /dev/null
@@ -0,0 +1,41 @@
+# This Makefile is specifically tailored for the binaries of this tutorial.\r
+\r
+# For your own project, you should use the one provided at \r
+# http://simgrid.gforge.inria.fr/simgrid/latest/doc/install_yours.html\r
+\r
+# Some configuration\r
+SIMGRID_INSTALL_PATH = /opt/simgrid # Where you installed simgrid\r
+CC = gcc                            # Your compiler (on Mac, use clang instead)\r
+\r
+# No change needed bellow for this tutorial.\r
+############################################################################\r
+\r
+all: masterworker1 masterworker2 masterworker3 masterworker4\r
+masterworker1: masterworker1.o\r
+masterworker2: masterworker2.o\r
+masterworker3: masterworker3.o\r
+masterworker4: masterworker4.o\r
+\r
+WARNING = -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \\r
+          -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes \\r
+          -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls \\r
+         -Wnested-externs -Wpointer-arith -Wwrite-strings\r
+\r
+# CFLAGS = -g -O0 $(WARNINGS) # Use this line to make debugging easier\r
+CFLAGS = -g -O2 $(WARNINGS) # Use this line to get better performance\r
+\r
+# No change should be mandated past that line\r
+#############################################\r
+# The following are implicit rules, used by default to actually build\r
+# the targets for which you listed the dependencies above.\r
+\r
+# The blanks before the $(CC) must be a Tab char, not spaces\r
+%: %.o\r
+       $(CC) -L$(strip $(SIMGRID_INSTALL_PATH))/lib/    $(CFLAGS) $^ -lsimgrid -o $@\r
+%.o: %.c\r
+       $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include $(CFLAGS) -c -o $@ $<\r
+       \r
+clean:\r
+       rm -f *.o *~\r
+.PHONY: clean\r
+               \r