aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-09-02 03:24:53 +0000
committer_ov4 <ov4@ov4.org>2026-09-02 03:24:53 +0000
commite57043d6f6819728ea5f22c949374864404654d2 (patch)
tree33e642c6e99b11e961c52359ad26a8803d5ec7f4 /Makefile
parent663c40e2d9299697697cb4e4ce767b344a7ad7ec (diff)
macos support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a81885e..d1b3e6e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+CC = gcc
CXX = g++
SRC_DIR = src
INCLUDE_DIR = include
@@ -9,8 +10,12 @@ MAKEFLAGS += -j8
CPPFLAGS = -I$(INCLUDE_DIR) -MMD -MP -flto
CXXFLAGS = -std=c++23 -Wall -Wextra -O3 -flto
-# static
-LDFLAGS += -static -static-libgcc -static-libstdc++
+TARGET_OS ?= $(shell uname -s)
+
+ifeq ($(TARGET_OS),Linux)
+ LDFLAGS += -static -static-libgcc -static-libstdc++
+else
+ $(warning Unknown target OS: $(TARGET_OS))
SRCS = $(shell find $(SRC_DIR) -name '*.cc')
OBJS = $(SRCS:%=$(BUILD)/%.o)