CC=gcc ICC =icc DEBUG ?= 1 CFLAGS=-O3 -lm -Wall -mavx -march=ivybridge -mtune=ivybridge -fopenmp #CFLAGS=-O3 -lm -Wall -mavx2 -mfma -march=haswell -mtune=haswell #CFLAGS=-O3 -Wall -xCORE-AVX-I #CFLAGS=-O3 -Wall -xCORE-AVX2 ICFLAGS=-O3 -Wall -qopenmp -axCORE-AVX2,CORE-AVX-I -lrt CPU_COMPILE= $(ICC) $(ICFLAGS) ifeq ($(DEBUG), 1) CPU_COMPILE += -D_DEBUG_ endif CPU_COMPILE_OBJ= $(CPU_COMPILE) -c EXT_DIR = /users/guest/petyros/Training/External_Functions/ SOURCE = OpenMP.c OpenMP_aff.c OBJECTS = util.o matrix_op.o timer.o input.o PROGRAMS= OpenMP OpenMP_aff all: $(PROGRAMS) OpenMP: $(OBJECTS) OpenMP.c $(CPU_COMPILE) OpenMP.c -o $@ $(OBJECTS) OpenMP_aff: $(OBJECTS) OpenMP_aff.c $(CPU_COMPILE) OpenMP_aff.c -o $@ $(OBJECTS) %.o: $(EXT_DIR)%.c $(CPU_COMPILE_OBJ) -o $@ $< %.o: %.h clean: $(RM) $(PROGRAMS) $(OBJECTS)