X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/180bb2169a8dbe211647c7790736f8a53c7d552f..06461662337a4831f2d69e3b0afe5cbe17ed9474:/doc/tuto-msg/Makefile diff --git a/doc/tuto-msg/Makefile b/doc/tuto-msg/Makefile index 8340d9272c..18f9df5355 100644 --- a/doc/tuto-msg/Makefile +++ b/doc/tuto-msg/Makefile @@ -4,23 +4,22 @@ # http://simgrid.gforge.inria.fr/simgrid/latest/doc/install_yours.html # Some configuration -SIMGRID_INSTALL_PATH = ../.. # Where you installed simgrid -CC = gcc # Your compiler (on Mac, use clang instead) +SIMGRID_INSTALL_PATH ?= ../.. # Where you installed simgrid +CC ?= gcc # Your compiler (on Mac, use clang instead) # No change needed bellow for this tutorial. ############################################################################ all: masterworker -masterworker: masterworker.o -WARNING = -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \ - -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls \ - -Wnested-externs -Wpointer-arith -Wwrite-strings -WARNING += -Werror # Comment that line to not be in paranoid mode +WARNINGS = -Wall -Wextra -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \ + -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wwrite-strings \ + -Wmissing-noreturn -Wredundant-decls \ + -Wno-nested-externs -Wno-strict-prototypes -Wno-unused-parameter +WARNINGS += -Werror # Comment that line to not be in paranoid mode -# CFLAGS = -std=gnu99 -g -O0 $(WARNINGS) # Use this line to make debugging easier -CFLAGS = -std=gnu99 -g -O2 $(WARNINGS) # Use this line to get better performance +# CFLAGS = -std=gnu99 -g -O0 $(WARNINGS) $(EXTRA_CFLAGS) # Use this line to make debugging easier +CFLAGS = -std=gnu99 -g -O2 $(WARNINGS) $(EXTRA_CFLAGS) # Use this line to get better performance # No change should be mandated past that line ############################################# @@ -28,10 +27,6 @@ CFLAGS = -std=gnu99 -g -O2 $(WARNINGS) # Use this line to get better performance # the targets for which you listed the dependencies above. # The blanks before the $(CC) must be a Tab char, not spaces -%: %.o - $(CC) -L$(strip $(SIMGRID_INSTALL_PATH))/lib/ $(CFLAGS) $^ -lsimgrid -o $@ -%.o: %.c - $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include $(CFLAGS) -c -o $@ $< %: %.c $(CC) -I$(strip $(SIMGRID_INSTALL_PATH))/include -L$(strip $(SIMGRID_INSTALL_PATH))/lib/ $(CFLAGS) $^ -lsimgrid -o $@