diff --git a/exercises/MPI_examples/manager-worker/Makefile b/exercises/MPI_examples/manager-worker/Makefile index 73ba6f508c732c06599b37539cb3146dfc3ce896..34e78127c3dd42a674268d1362224fd2a2b0b309 100644 --- a/exercises/MPI_examples/manager-worker/Makefile +++ b/exercises/MPI_examples/manager-worker/Makefile @@ -5,15 +5,18 @@ CC = mpicc CFLAGS = -Wall -std=c11 CFLAGS += -I. # add the current directory to the include path +.PHONY: all +all: $(PROG1) $(PROG2) # build the program + $(PROG1): manager.o $(CC) $(CFLAGS) $^ -o $@ $(PROG2): worker.o $(CC) $(CFLAGS) $^ -o $@ -.Phone: run +.PHONY: run run: $(PROG1) $(PROG2) # build and run the program - MY_MPIRUN_OPTIONS="-usize 8" mpirun -np 4 ./$(PROG1) + mpirun -np 1 ./$(PROG1) $(OBJECTS): %.o: %.c # compile the source files into object files $(CC) $(CFLAGS) -c $<