toytracer/Makefile

25 lines
478 B
Makefile
Raw Normal View History

2020-06-02 22:06:53 +00:00
CXX = g++
CXXFLAGS = -std=c++14 -Wall -Wextra -Wno-unused-parameter -march=native -Ofast -fopenmp -flto
2020-06-02 22:06:53 +00:00
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
2020-06-02 22:06:53 +00:00
TARGET = wtracer
all: $(TARGET) run
run:
2020-06-06 14:16:31 +00:00
time -f '%E elapsed' ./wtracer > image.ppm
2020-06-02 22:06:53 +00:00
eog image.ppm
%.o: %.cpp $(DEPS)
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(TARGET): $(OBJ)
$(CXX) $(CXXFLAGS) -o $@ $^
clean:
$(RM) $(TARGET) $(OBJ) image.ppm