toytracer/Makefile

25 lines
611 B
Makefile
Raw Normal View History

2020-06-02 22:06:53 +00:00
CXX = g++
2020-06-08 21:37:10 +00:00
CXXFLAGS = -std=c++20 -Wall -Wextra -Wno-unused-parameter -march=native -O3 -flto -fopenmp
2020-06-02 22:06:53 +00:00
2020-06-13 20:00:05 +00:00
DEPS = util.h vec3.h color.h ray.h camera.h hittable.h hittable_list.h sphere.h material.h lodepng.h moving_sphere.h bvh.h aabb.h texture.h aarect.h
OBJ = main.o material.o vec3.o lodepng.o sphere.o moving_sphere.o bvh.o aarect.o hittable_list.o
2020-06-02 22:06:53 +00:00
2020-06-07 19:47:27 +00:00
TARGET = toytracer
2020-06-02 22:06:53 +00:00
all: $(TARGET) run
2020-06-06 22:03:25 +00:00
run: $(TARGET)
time -f '%E elapsed %M Kb memory' ./$(TARGET)
2020-06-07 01:28:59 +00:00
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