# # sample Makefile for gcc with OpenMP # # usage examples: # "make hello" to compile "hello.c" to "hello" # "make hello++" to compile "hello++.cpp" to "hello" # OMPC = gcc CFLAGS = -O -Wall -pedantic -fopenmp -std=c99 OMPCC = g++ CCFLAGS = -O -Wall -pedantic -fopenmp -std=c++98 %: %.c $(OMPC) -o $@ $(CFLAGS) $< %: %.cpp $(OMPCC) -o $@ $(CCFLAGS) $<