From 16afbddeada7161e931dc261d3404bb5bbc1743d Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:54:22 +1100 Subject: add .m on mac. log INFO and module name --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7c50323..9689dae 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,11 @@ CFLAGS := -Wall -Wextra -O2 $(INCLUDES) LDFLAGS := -lglfw # Detect OS -UNAME_S := $(shell uname -s) +ifeq ($(OS),Windows_NT) + DETECTED_OS := Windows +else + DETECTED_OS := $(shell uname -s) +endif # Directories SRC_DIR := src @@ -18,6 +22,11 @@ EXAMPLES_DIR := examples SRCS := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/**/*.c) OBJS := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS)) +# Add Metal backend written in Objective C only on Mac platform +ifeq ($(DETECTED_OS),Darwin) + SRCS += $(SRC_DIR)/backend_mtl.m +endif + # Library outputs STATIC_LIB := $(BUILD_DIR)/libceleritas.a ifeq ($(UNAME_S),Darwin) -- cgit v1.2.3-70-g09d2