raw
mpi_second_cut          1 PROGRAM = test_mpi
mpi_second_cut 2
mpi_second_cut 3 CXX = gcc
mpi_second_cut 4 OBJECTS := $(patsubst %.c,%.o,$(wildcard *.c))
mpi_second_cut 5 FLAGS = -g -Wall
mpi_second_cut 6 INCLUDE = -I ../include
mpi_second_cut 7 MPI = ../bin/mpi.a
mpi_second_cut 8 LIBS := $(MPI)
mpi_second_cut 9
mpi_second_cut 10 .SUFFIXES: .o .c
mpi_second_cut 11
mpi_second_cut 12 .c.o:
mpi_second_cut 13 $(CXX) $(FLAGS) $(INCLUDE) -c $< -o $@
mpi_second_cut 14
mpi_second_cut 15 all: $(PROGRAM)
mpi_second_cut 16
mpi_second_cut 17 $(PROGRAM): $(OBJECTS)
mpi_second_cut 18 $(CXX) $(FLAGS) $(INCLUDE) -o $(PROGRAM) $(OBJECTS) $(LIBS)
mpi_second_cut 19
mpi_second_cut 20 clean :
mpi_second_cut 21 rm -rf nul core *flymake* *.o $(PROGRAM) *~ bin obj
mpi_second_cut 22
mpi_second_cut 23 check-syntax:
mpi_second_cut 24 $(CXX) -c $(FLAGS) $(INCLUDE) -o nul -Wall -S $(CHK_SOURCES)