Browse Source

Add SKIP_STRIPPING option to Makefiles to allow disabling stripping of binaries (#159)

tags/v0.9.1
Simon van der Veldt Filipe Coelho <falktx@falktx.com> 4 years ago
parent
commit
233e8c10cf
3 changed files with 11 additions and 5 deletions
  1. +7
    -1
      c++/Makefile.mk
  2. +2
    -2
      c++/jackmeter/Makefile
  3. +2
    -2
      c++/xycontroller/Makefile

+ 7
- 1
c++/Makefile.mk View File

@@ -7,6 +7,9 @@
AR ?= ar
CC ?= gcc
CXX ?= g++
MOC ?= $(shell pkg-config --variable=moc_location QtCore)
RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
UIC ?= $(shell pkg-config --variable=uic_location QtCore)
STRIP ?= strip
WINDRES ?= windres

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

ifneq ($(SKIP_STRIPPING),true)
LINK_FLAGS += -Wl,--strip-all
endif

# --------------------------------------------------------------

# Currently broken


+ 2
- 2
c++/jackmeter/Makefile View File

@@ -31,10 +31,10 @@ OBJS = \
all: cadence-jackmeter

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

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

# --------------------------------------------------------------



+ 2
- 2
c++/xycontroller/Makefile View File

@@ -35,10 +35,10 @@ OBJS = xycontroller.o \
all: cadence-xycontroller

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

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

# --------------------------------------------------------------



Loading…
Cancel
Save