toytracer/Makefile
2020-06-07 00:03:25 +02:00

25 lines
488 B
Makefile

CXX = g++
CXXFLAGS = -std=c++14 -Wall -Wextra -Wno-unused-parameter -march=native -Ofast -fopenmp -flto
DEPS = util.h vec3.h color.h ray.h camera.h hittable.h hittable_list.h sphere.h material.h
OBJ = wtracer.o material.o vec3.o
TARGET = wtracer
all: $(TARGET) run
run: $(TARGET)
time -f '%E elapsed' ./wtracer > image.ppm
eog image.ppm
%.o: %.cpp $(DEPS)
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(TARGET): $(OBJ)
$(CXX) $(CXXFLAGS) -o $@ $^
clean:
$(RM) $(TARGET) $(OBJ) image.ppm