From 7949ee4ab46695648c9be72193c27ae9daa0217e Mon Sep 17 00:00:00 2001 From: thorium1256 Date: Sun, 22 Jun 2025 17:59:22 +0300 Subject: [PATCH] silly makefile stuff --- Makefile.unix | 13 ++++++++----- Makefile.win | 9 ++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile.unix b/Makefile.unix index d856527..8cd79c2 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -15,6 +15,9 @@ SRC_DIR := src BIN_DIR := bin DBG_DIR := $(BIN_DIR)/debug RLS_DIR := $(BIN_DIR)/release +DBG_EXEC := $(BIN_DIR)/debug/debug +RLS_EXEC := $(BIN_DIR)/release/release +RLS_STRIPPED_EXEC := $(BIN_DIR)/release/release # sources and objects SRCS := $(wildcard $(SRC_DIR)/*.cpp) @@ -31,18 +34,18 @@ $(shell mkdir -p $(BUILD_DIR)) all: debug -debug: $(DBG_DIR)/debug -release: $(RLS_DIR)/release $(RLS_DIR)/release_stripped +debug: $(DBG_EXEC) +release: $(RLS_EXEC) $(RLS_STRIPPED_EXEC) both: debug release # linking -$(DBG_DIR)/debug: $(DBG_OBJS) +$(DBG_EXEC): $(DBG_OBJS) $(CXX) -o $@ $^ $(DBG_LDFLAGS) -$(RLS_DIR)/release_stripped: $(RLS_OBJS) +$(RLS_STRIPPED_EXEC): $(RLS_OBJS) $(CXX) -o $@ $^ $(RLS_LDFLAGS) -$(RLS_DIR)/release: $(RLS_OBJS) +$(RLS_EXEC): $(RLS_OBJS) $(CXX) -o $@ $^ $(LDFLAGS) # compiling diff --git a/Makefile.win b/Makefile.win index 34289ab..3ad019b 100644 --- a/Makefile.win +++ b/Makefile.win @@ -16,6 +16,9 @@ BIN_DIR := bin 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 # sources and objects LIBS := $(wildcard $(LIB_DIR)/*.dll) @@ -43,13 +46,13 @@ libraries_debug: $(LIBS_DBG) libraries_release: $(LIBS_RLS) # linking -$(DBG_DIR)/debug.exe: $(DBG_OBJS) +$(DBG_EXEC): $(DBG_OBJS) $(CXX) -o $@ $^ $(DBG_LDFLAGS) -$(RLS_DIR)/release_stripped.exe: $(RLS_OBJS) +$(RLS_STRIPPED_EXEC): $(RLS_OBJS) $(CXX) -o $@ $^ $(RLS_STRP_LDFLAGS) -$(RLS_DIR)/release.exe: $(RLS_OBJS) +$(RLS_EXEC): $(RLS_OBJS) $(CXX) -o $@ $^ $(LDFLAGS) # compiling