aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-09-06 14:48:41 +0000
committer_ov4 <ov4@ov4.org>2026-09-06 14:48:41 +0000
commit4e0e8d7e81ac3f352d4087396e21d1cdf927eaaf (patch)
treeeb9b4530fd678137730d2619d5d134cc2e9cc16b
parent857244c8c3a180d15fa1f8fe8b1a475320ef89f1 (diff)
typo
-rw-r--r--Makefile13
1 files changed, 5 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 1858e41..b5253ad 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ CXX ?= g++
SRC_DIR := src
INCLUDE_DIR := include
-BUILD_ROOT := build
+BUILD_DIR := build
DEPS_DIR := third_party
MAGIC_ENUM_DIR := $(DEPS_DIR)/magic_enum
@@ -21,12 +21,10 @@ STATIC ?= 0
ifeq ($(DEBUG),0)
# release
- CONFIG := release
OPTFLAGS := -O3 -DNDEBUG
else
# debug
LTO := 0
- CONFIG := debug
OPTFLAGS := -Og
OPTFLAGS += -g3 -fno-omit-frame-pointer -D_GLIBCXX_ASSERTIONS
endif
@@ -35,8 +33,7 @@ ifeq ($(LTO),1)
LTOFLAGS := -flto=auto
endif
-BUILD := $(BUILD_ROOT)/$(CONFIG)
-TARGET := $(BUILD)/ccshell
+TARGET := $(BUILD_DIR)/ccshell
WARNFLAGS := -Wall -Wextra
@@ -59,14 +56,14 @@ endif
ALL_LDFLAGS += $(LDFLAGS) $(EXTRA_LDFLAGS)
SRCS := $(shell find $(SRC_DIR) -name '*.cc')
-OBJS := $(SRCS:%=$(BUILD)/%.o)
+OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(OBJS:.o=.d)
$(TARGET): $(OBJS)
@mkdir -p $(dir $@)
$(CXX) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
-$(BUILD)/%.cc.o: %.cc
+$(BUILD_DIR)/%.cc.o: %.cc
@mkdir -p $(dir $@)
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
@@ -83,7 +80,7 @@ magic-enum:
fi
clean:
- rm -rf $(BUILD_ROOT)
+ rm -rf $(BUILD_DIR)
fresh:
$(MAKE) clean