1
0
Fork 0
This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
Ray-Tracer/Makefile
2016-10-20 21:16:34 +02:00

21 lines
342 B
Makefile

CPP_FILES := $(wildcard src/*.cpp)
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
LD_FLAGS :=
CC_FLAGS := -std=gnu++11
ifeq ($(OS),Windows_NT)
EXEC := main.exe
else
EXEC := main
endif
$(EXEC): $(OBJ_FILES)
g++ $(LD_FLAGS) -o $@ $^
obj/%.o: src/%.cpp
mkdir -p obj
g++ $(CC_FLAGS) -c -o $@ $<
clean:
rm obj/*
rm $(EXEC)