init: create git repo

This commit is contained in:
2022-12-17 18:22:51 +01:00
commit e7bc9882e6
11 changed files with 860 additions and 0 deletions

29
Makefile Normal file
View File

@@ -0,0 +1,29 @@
SHELL = /bin/bash
SRC_DIR = ./src
INC_DIR = ./include
OBJ_DIR = ./obj
HEADERS = $(wildcard $(INC_DIR)/*.hpp)
SRC_FILES = $(wildcard $(SRC_DIR)/*.cpp)
OBJ_FILES = $(addprefix $(OBJ_DIR)/,$(notdir $(SRC_FILES:.cpp=.o)))
CXXFLAGS += -Wall -std=c++2a -fopenmp -O3 -Ofast -march=native
all: bin/raytracer
$(OBJ_DIR)/%.o: src/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $^
bin/raytracer: $(OBJ_FILES)
@mkdir -p $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -o $@ $^
.PHONY: debug
debug: CXXFLAGS += -O0 -g
debug: clean bin/raytracer
.PHONY: clean
clean:
$(RM) -r obj/*.o
$(RM) bin/*