Files
RT_GPU/WMakefile
2024-12-23 18:19:41 +01:00

76 lines
2.0 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# **************************************************************************** #
# #
# ::: :::::::: #
# WMakefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: TheRed <TheRed@students.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/14 22:33:37 by TheRed #+# #+# #
# Updated: 2024/10/14 22:33:37 by TheRed ### ########.fr #
# #
# **************************************************************************** #
BLACK = 
RED = 
GREEN = 
YELLOW = 
BLUE = 
MAGENTA = 
CYAN = 
WHITE = 
RESET = 
LINE_CLR = \33[2K\r
NAME := RT
SRCS_DIR := srcs
OBJS_DIR := .objs
ALL_SRCS := RT.cpp gl.cpp \
Window.cpp \
Shader.cpp \
Camera.cpp
SRCS := $(ALL_SRCS:%=$(SRCS_DIR)/%)
OBJS := $(addprefix $(OBJS_DIR)/, $(SRCS:%.cpp=%.o))
CC := g++
IFLAGS := -Ofast -I./includes -L./lib -lglfw3 -lopengl32 -lgdi32 -lcglm
RM := del /f /s /q
MAKEFLAGS += --no-print-directory
DIR_DUP = if not exist "$(@D)" mkdir "$(@D)"
# RULES ********************************************************************** #
all: $(NAME)
$(NAME): $(OBJS) $(HEADERS)
@$(CC) -o $(NAME) $(OBJS) $(IFLAGS)
@echo $(WHITE) $(NAME): PROJECT COMPILED !$(RESET) & echo:
$(OBJS_DIR)/%.o: %.cpp
@$(DIR_DUP)
@echo $(WHITE) $(NAME): $(WHITE)$<$(RESET) $(GREEN)compiling...$(RESET)
@$(CC) -c $^ $(IFLAGS) -o $@
fclean:
@echo $(WHITE)$(NAME):$(RED) cleaned.$(RESET)
@del /f /s /q $(NAME).exe
@rmdir /S /Q "$(OBJS_DIR)"
re:
@$(MAKE) fclean
@$(MAKE) all
.PHONY: all clean fclean dclean re bonus