toytracer/Makefile

25 lines
496 B
Makefile
Raw Normal View History

2020-06-02 22:06:53 +00:00
CXX = g++
2020-06-07 10:10:51 +00:00
CXXFLAGS = -std=c++20 -Wall -Wextra -Wno-unused-parameter -march=native -Ofast -flto -fopenmp
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:
2020-06-07 10:10:51 +00:00
$(RM) $(TARGET) $(OBJ) image.png
2020-06-02 22:06:53 +00:00