Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
update changelog
[simgrid.git] / doc / tuto-msg / Makefile
1 # This Makefile is specifically tailored for the binaries of this tutorial.
2
3 # For your own project, you should use the one provided at 
4 # http://simgrid.gforge.inria.fr/simgrid/latest/doc/install_yours.html
5
6 # Some configuration
7 SIMGRID_INSTALL_PATH ?= ../.. # Where you installed simgrid 
8 CC ?= gcc                     # Your compiler (on Mac, use clang instead)
9
10 # No change needed bellow for this tutorial.
11 ############################################################################
12
13 all: masterworker
14
15 WARNINGS = -Wall -Wextra -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \
16           -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wwrite-strings \
17           -Wmissing-noreturn -Wredundant-decls \
18           -Wno-nested-externs  -Wno-strict-prototypes -Wno-unused-parameter
19 WARNINGS += -Werror # Comment that line to not be in paranoid mode
20
21 # CFLAGS = -std=gnu99 -g -O0 $(WARNINGS) $(EXTRA_CFLAGS) # Use this line to make debugging easier
22 CFLAGS = -std=gnu99 -g -O2 $(WARNINGS) $(EXTRA_CFLAGS) # Use this line to get better performance
23
24 # No change should be mandated past that line
25 #############################################
26 # The following are implicit rules, used by default to actually build
27 # the targets for which you listed the dependencies above.
28
29 .SUFFIXES: .c
30 # The blanks before the $(CC) must be a Tab char, not spaces
31 .c:
32         $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include -L$(strip $(SIMGRID_INSTALL_PATH))/lib/ $(CFLAGS) $< -lsimgrid -o $@
33
34 clean:
35         rm -f *.o *~ masterworker masterworker-sol1 masterworker-sol2 masterworker-sol3 masterworker-sol4
36 .PHONY: clean
37