toytracer/Makefile
2020-06-03 22:39:40 +02:00

25 lines
322 B
Makefile

CXX = g++
CXXFLAGS = -Wall -Wextra -O2 -std=c++14
DEPS = vec3.h color.h ray.h
OBJ = wtracer.o
TARGET = wtracer
all: $(TARGET) run
run:
./wtracer > image.ppm
eog image.ppm
%.o: %.cpp $(DEPS)
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(TARGET): $(OBJ)
$(CXX) $(CXXFLAGS) -o $@ $^
clean:
$(RM) $(TARGET) $(OBJ) image.ppm