2020-06-02 22:06:53 +00:00
|
|
|
CXX = g++
|
|
|
|
|
2020-06-06 21:21:21 +00:00
|
|
|
CXXFLAGS = -std=c++14 -Wall -Wextra -Wno-unused-parameter -march=native -Ofast -fopenmp -flto
|
2020-06-02 22:06:53 +00:00
|
|
|
|
2020-06-07 01:28:59 +00:00
|
|
|
DEPS = util.h vec3.h color.h ray.h camera.h hittable.h hittable_list.h sphere.h material.h lodepng.h
|
|
|
|
OBJ = wtracer.o material.o vec3.o lodepng.o
|
2020-06-02 22:06:53 +00:00
|
|
|
|
|
|
|
TARGET = wtracer
|
|
|
|
|
|
|
|
all: $(TARGET) run
|
|
|
|
|
2020-06-06 22:03:25 +00:00
|
|
|
run: $(TARGET)
|
2020-06-07 01:28:59 +00:00
|
|
|
time -f '%E elapsed' ./wtracer
|
|
|
|
eog image.png
|
2020-06-02 22:06:53 +00:00
|
|
|
|
|
|
|
%.o: %.cpp $(DEPS)
|
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(TARGET): $(OBJ)
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $^
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(TARGET) $(OBJ) image.ppm
|
|
|
|
|