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