CXX = g++ CXXFLAGS = -Wall -Wextra -std=c++17 -fwrapv $(OPTFLAGS) OPTFLAGS = -O3 -ffast-math -march=native -mtune=native LDFLAGS = -pthread -framework OpenCL TARGETS = aberth OBJECTS = $(patsubst %.cpp,%.o,$(wildcard *.cpp)) .PHONY: all clean remake all: $(TARGETS) clean: rm -f $(TARGETS) *.o aberth_kernel.h aberth_kernel.c remake: clean $(MAKE) all aberth: $(OBJECTS) aberth_kernel.o ../lodepng.o $(CXX) -o $@ $^ $(LDFLAGS) aberth_kernel.h: aberth_kernel.fut futhark opencl --library $^ aberth_kernel.o: aberth_kernel.h gcc -c $(OPTFLAGS) -o $@ aberth_kernel.c $(OBJECTS): %.o: %.cpp $(wildcard *.h) aberth_kernel.h $(CXX) $(CXXFLAGS) -c -o $@ $<