cpdebug.mk 698 Bytes
Newer Older
Alam Ed Arias committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#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)
27
	-$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt"
Alam Ed Arias committed
28
ifndef COMSPEC
29
	-$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt"
Alam Ed Arias committed
30 31 32
endif
	-$(UPX) $(UPX_OPTS) $(BIN)