diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-10-17 15:54:22 +1100 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-10-17 15:54:22 +1100 |
commit | 16afbddeada7161e931dc261d3404bb5bbc1743d (patch) | |
tree | e75db4d668c6a9ebfd07e4dd4d1fdabb66a95896 /Makefile | |
parent | ff96a533014174d0857872f86f1536a06089f3d2 (diff) |
add .m on mac. log INFO and module name
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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) |