From e379d5e8eebbd714e1fac0f8a175c31f14b9fec4 Mon Sep 17 00:00:00 2001 From: thorium1256 Date: Sun, 22 Jun 2025 18:37:08 +0300 Subject: [PATCH] makefile madness --- Makefile.unix | 10 +++------- Makefile.win | 12 ++++-------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Makefile.unix b/Makefile.unix index 867c966..bea757b 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -16,8 +16,7 @@ BIN_DIR := bin DBG_DIR := $(BIN_DIR)/debug RLS_DIR := $(BIN_DIR)/release DBG_EXEC := $(DBG_DIR)/debug -RLS_EXEC := $(RLS_DIR)/release -RLS_STRIPPED_EXEC := $(RLS_DIR)/release_stripped +RLS_STRIPPED_EXEC := $(RLS_DIR)/tuimine # sources and objects SRCS := $(wildcard $(SRC_DIR)/*.cpp) @@ -32,10 +31,10 @@ $(shell mkdir -p $(BUILD_DIR)) # phony rules .PHONY := all debug release clean -all: debug +all: release debug: $(DBG_EXEC) -release: $(RLS_EXEC) $(RLS_STRIPPED_EXEC) +release: $(RLS_STRIPPED_EXEC) both: debug release # linking @@ -45,9 +44,6 @@ $(DBG_EXEC): $(DBG_OBJS) $(RLS_STRIPPED_EXEC): $(RLS_OBJS) $(CXX) -o $@ $^ $(RLS_LDFLAGS) -$(RLS_EXEC): $(RLS_OBJS) - $(CXX) -o $@ $^ $(LDFLAGS) - # compiling $(BUILD_DIR)/debug_%.o: $(SRC_DIR)/%.cpp $(CXX) -c -o $@ $< $(DBG_CXXFLAGS) diff --git a/Makefile.win b/Makefile.win index 3ad019b..6819b87 100644 --- a/Makefile.win +++ b/Makefile.win @@ -17,8 +17,7 @@ DBG_DIR := $(BIN_DIR)\debug RLS_DIR := $(BIN_DIR)\release LIB_DIR := lib DBG_EXEC := $(DBG_DIR)\debug.exe -RLS_STRIPPED_EXEC := $(RLS_DIR)\release_stripped.exe -RLS_EXEC := $(RLS_DIR)\release.exe +RLS_STRIPPED_EXEC := $(RLS_DIR)\tuimine.exe # sources and objects LIBS := $(wildcard $(LIB_DIR)/*.dll) @@ -36,10 +35,10 @@ $(shell if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)) # phony rules .PHONY := all debug release clean libraries_debug libraries_release both -all: debug +all: release -debug: $(DBG_DIR)/debug.exe libraries_debug -release: $(RLS_DIR)/release_stripped.exe $(RLS_DIR)/release.exe libraries_release +debug: $(DBG_EXEC) libraries_debug +release: $(RLS_STRIPPED_EXEC) libraries_release both: debug release libraries_debug: $(LIBS_DBG) @@ -52,9 +51,6 @@ $(DBG_EXEC): $(DBG_OBJS) $(RLS_STRIPPED_EXEC): $(RLS_OBJS) $(CXX) -o $@ $^ $(RLS_STRP_LDFLAGS) -$(RLS_EXEC): $(RLS_OBJS) - $(CXX) -o $@ $^ $(LDFLAGS) - # compiling $(BUILD_DIR)/debug_%.o: $(SRC_DIR)/%.cpp $(CXX) -c -o $@ $< $(DBG_CXXFLAGS)