Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make these example files compile
[simgrid.git] / doc / msg-tuto-src / Makefile
1 # This Makefile is specifically tailored for the binaries of this tutorial.\r
2 \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
5 \r
6 # Some configuration\r
7 SIMGRID_INSTALL_PATH = /opt/simgrid # Where you installed simgrid\r
8 CC = gcc                            # Your compiler (on Mac, use clang instead)\r
9 \r
10 # No change needed bellow for this tutorial.\r
11 ############################################################################\r
12 \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
18 \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
23 \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
26 \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
31 \r
32 # The blanks before the $(CC) must be a Tab char, not spaces\r
33 %: %.o\r
34         $(CC) -L$(strip $(SIMGRID_INSTALL_PATH))/lib/    $(CFLAGS) $^ -lsimgrid -o $@\r
35 %.o: %.c\r
36         $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include $(CFLAGS) -c -o $@ $<\r
37         \r
38 clean:\r
39         rm -f *.o *~\r
40 .PHONY: clean\r
41                 \r