title: Simple makefile for MPI-based C program
body: <p>I am writing my first MPI-based C program. I have four files namely, MPI_Program.c and Helper.c, and their corresponding .h files. MPI_Program.c includes mpi.h and Helper.h. </p>
  
  <p>I wrote the following simple makefile to compile MPI_Program but I get the error "No rule to make target mpi.h"</p>
  
  <p>Here's the makefile:</p>
  
  <pre><code># Rules to produce the target
  
  all: MPI_Program
  
  MPI_Program: MPI_Program.o Helper.o 
       mpixlc MPI_Program.o Helper.o -f machineFile -std=c99 -g -o MPI_Program
  
  
  # Rules to produce the object files
  
  Helper.o: Helper.c Helper.h
       gcc -c Helper.c -std=c99 -g
  
  MPI_Program.o: MPI_Program.c MPI_Program.h Helper.h mpi.h
       mpixlc -c MPI_Program.c -std=c99 -g -f machineFile
  </code></pre>
  
  <p>I am certainly missing something...Can someone please advise.</p>