From 32850e8131edbbf3104b8b501fbeb2194ee068a9 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 28 Nov 2022 16:22:38 +0100 Subject: [PATCH] Significantly simplify the makefile --- OpenMP/linear-algebra/kernels/atax/Makefile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/OpenMP/linear-algebra/kernels/atax/Makefile b/OpenMP/linear-algebra/kernels/atax/Makefile index c82dd7b..a047a1d 100644 --- a/OpenMP/linear-algebra/kernels/atax/Makefile +++ b/OpenMP/linear-algebra/kernels/atax/Makefile @@ -1,3 +1,6 @@ +# Remove all make implicit rules because this is already complex enough as it is +MAKEFLAGS+= -r + # -DPOLYBENCH_TIME makes Polybench output the execution time of the program CXXFLAGS+= -DPOLYBENCH_TIME # -O3 applies all compiler optimization, improving from 800ms to 300ms @@ -13,19 +16,12 @@ NVCC:=$(CUDA_HOME)/bin/nvcc NVCFLAGS:=$(CXXFLAGS) $(NVOPT) -INCPATHS:=-I../../../utilities +%.elf: %.cu.o polybench.cu.o + $(NVCC) $(NVCFLAGS) $^ -o $@ $(LDFLAGS) - -# Create an automake definition for .cu files -%.cu.o: +%.cu.o: %.cu $(NVCC) $(NVCFLAGS) -c $< -o $@ -%.exe: %.cu.o - $(NVCC) $(NVCFLAGS) $(INCPATHS) $^ -o $@ $(LDFLAGS) - -%.elf: %.cu.o - $(NVCC) $(NVCFLAGS) $(INCPATHS) $^ -o $@ $(LDFLAGS) - .PHONY: bench