Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit 233e8c1

Browse files
simonvanderveldtfalkTX
authored andcommitted
Add SKIP_STRIPPING option to Makefiles to allow disabling stripping of binaries (#159)
1 parent a2e733a commit 233e8c1

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

c++/Makefile.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
AR ?= ar
88
CC ?= gcc
99
CXX ?= g++
10+
MOC ?= $(shell pkg-config --variable=moc_location QtCore)
11+
RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
12+
UIC ?= $(shell pkg-config --variable=uic_location QtCore)
1013
STRIP ?= strip
1114
WINDRES ?= windres
1215

@@ -22,7 +25,6 @@ DEBUG ?= false
2225
ifeq ($(DEBUG),true)
2326
BASE_FLAGS = -O0 -g -Wall -Wextra
2427
BASE_FLAGS += -DDEBUG
25-
STRIP = true # FIXME
2628
else
2729
BASE_FLAGS = -O3 -ffast-math -Wall -Wextra
2830
BASE_FLAGS += -DNDEBUG
@@ -38,6 +40,10 @@ ifneq ($(DEBUG),true)
3840
BUILD_CXX_FLAGS += -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM -DQT_NO_DEBUG_OUTPUT
3941
endif
4042

43+
ifneq ($(SKIP_STRIPPING),true)
44+
LINK_FLAGS += -Wl,--strip-all
45+
endif
46+
4147
# --------------------------------------------------------------
4248

4349
# Currently broken

c++/jackmeter/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ OBJS = \
3131
all: cadence-jackmeter
3232

3333
cadence-jackmeter: $(FILES) $(OBJS)
34-
$(CXX) $(OBJS) $(LINK_FLAGS) -ldl -o $@ && $(STRIP) $@
34+
$(CXX) $(OBJS) $(LINK_FLAGS) -ldl -o $@
3535

3636
cadence-jackmeter.exe: $(FILES) $(OBJS) icon.o
37-
$(CXX) $(OBJS) icon.o $(LINK_FLAGS) -limm32 -lole32 -luuid -lwinspool -lws2_32 -mwindows -o $@ && $(STRIP) $@
37+
$(CXX) $(OBJS) icon.o $(LINK_FLAGS) -limm32 -lole32 -luuid -lwinspool -lws2_32 -mwindows -o $@
3838

3939
# --------------------------------------------------------------
4040

c++/xycontroller/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ OBJS = xycontroller.o \
3535
all: cadence-xycontroller
3636

3737
cadence-xycontroller: $(FILES) $(OBJS)
38-
$(CXX) $(OBJS) $(LINK_FLAGS) -ldl -o $@ && $(STRIP) $@
38+
$(CXX) $(OBJS) $(LINK_FLAGS) -ldl -o $@
3939

4040
cadence-xycontroller.exe: $(FILES) $(OBJS) icon.o
41-
$(CXX) $(OBJS) icon.o $(LINK_FLAGS) -limm32 -lole32 -luuid -lwinspool -lws2_32 -mwindows -o $@ && $(STRIP) $@
41+
$(CXX) $(OBJS) icon.o $(LINK_FLAGS) -limm32 -lole32 -luuid -lwinspool -lws2_32 -mwindows -o $@
4242

4343
# --------------------------------------------------------------
4444

0 commit comments

Comments
 (0)