Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
yet another attempt at testing the tuto on jenkins
[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 masterworker: masterworker.o
15
16 WARNING = -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \
17           -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes \
18           -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls \
19           -Wnested-externs -Wpointer-arith -Wwrite-strings
20 WARNING += -Werror # Comment that line to not be in paranoid mode
21
22 # CFLAGS = -std=gnu99 -g -O0 $(WARNINGS) # Use this line to make debugging easier
23 CFLAGS = -std=gnu99 -g -O2 $(WARNINGS) # Use this line to get better performance
24
25 # No change should be mandated past that line
26 #############################################
27 # The following are implicit rules, used by default to actually build
28 # the targets for which you listed the dependencies above.
29
30 # The blanks before the $(CC) must be a Tab char, not spaces
31 %: %.o
32         $(CC) -L$(strip $(SIMGRID_INSTALL_PATH))/lib/    $(CFLAGS) $^ -lsimgrid -o $@
33 %.o: %.c
34         $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include $(CFLAGS) -c -o $@ $<
35 %: %.c
36         $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include -L$(strip $(SIMGRID_INSTALL_PATH))/lib/  $(CFLAGS) $^ -lsimgrid -o $@ 
37
38 clean:
39         rm -f *.o *~ masterworker masterworker-sol1 masterworker-sol2 masterworker-sol3 masterworker-sol4
40 .PHONY: clean
41