From fe65f2b27150afb550919e7429574967a2c36e66 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Thu, 12 Oct 2023 18:12:23 +0000
Subject: [PATCH] Update cpdebug.mk Allow Env to overwrite Makefile's default
 OBJCOPY and OBJDUMP, just like CC

---
 cpdebug.mk | 64 +++++++++++++++++++++++++++---------------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/cpdebug.mk b/cpdebug.mk
index 6baedf227..e7b076303 100644
--- a/cpdebug.mk
+++ b/cpdebug.mk
@@ -1,32 +1,32 @@
-#Add-on Makefile for wxDev-C++ project file
-ifdef ComSpec
-COMSPEC=$(ComSpec)
-endif
-ifdef COMSPEC
-OBJCOPY=objcopy.exe
-OBJDUMP=objdump.exe
-GZIP?=gzip.exe
-else
-OBJCOPY=objcopy
-OBJDUMP=objdump
-GZIP?=gzip
-endif
-DBGNAME=$(BIN).debug
-OBJDUMP_OPTS?=--wide --source --line-numbers
-GZIP_OPTS?=-9 -f -n
-GZIP_OPT2=$(GZIP_OPTS) --rsyncable
-UPX?=upx
-UPX_OPTS?=--best --preserve-build-id
-UPX_OPTS+=-q
-
-all-after:
-	$(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt"
-	$(OBJCOPY) $(BIN) $(DBGNAME)
-	$(OBJCOPY) --strip-debug $(BIN)
-	-$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN)
-	-$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt"
-ifndef COMSPEC
-	-$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt"
-endif
-	-$(UPX) $(UPX_OPTS) $(BIN)
-
+#Add-on Makefile for wxDev-C++ project file
+ifdef ComSpec
+COMSPEC=$(ComSpec)
+endif
+ifdef COMSPEC
+OBJCOPY?=objcopy.exe
+OBJDUMP?=objdump.exe
+GZIP?=gzip.exe
+else
+OBJCOPY?=objcopy
+OBJDUMP?=objdump
+GZIP?=gzip
+endif
+DBGNAME=$(BIN).debug
+OBJDUMP_OPTS?=--wide --source --line-numbers
+GZIP_OPTS?=-9 -f -n
+GZIP_OPT2=$(GZIP_OPTS) --rsyncable
+UPX?=upx
+UPX_OPTS?=--best --preserve-build-id
+UPX_OPTS+=-q
+
+all-after:
+	$(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt"
+	$(OBJCOPY) $(BIN) $(DBGNAME)
+	$(OBJCOPY) --strip-debug $(BIN)
+	-$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN)
+	-$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt"
+ifndef COMSPEC
+	-$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt"
+endif
+	-$(UPX) $(UPX_OPTS) $(BIN)
+
-- 
GitLab