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