# Build all examples:   make
# Run one example:      mpirun -np 4 ./05_pi_collective
MPICC  ?= mpicc
CFLAGS ?= -O2 -Wall
LDLIBS  = -lm

PROGS = 01_hello 02_pingpong 03_exchange 04_ring 05_pi_collective 06_scatter_gather \
        07_column_type 08_comm_split 09_cart2d 10_rma_pi 11_shared_file

all: $(PROGS)

%: %.c
	$(MPICC) $(CFLAGS) -o $@ $< $(LDLIBS)

clean:
	rm -f $(PROGS) data.bin

.PHONY: all clean
