Commit fd6b49c0 authored by Slava Monich's avatar Slava Monich

Build debuginfo package

parent d4389af7
# -*- Mode: makefile -*-
# -*- Mode: gnu-makefile -*-
.PHONY: all debug release clean cleaner
.PHONY: mms_lib_debug_lib mms_lib_release_lib
......@@ -78,6 +78,15 @@ CFLAGS = $(shell pkg-config --cflags $(PKGS)) -I. -I$(GEN_DIR) \
-I$(MMS_LIB_DIR)/include -I$(MMS_OFONO_DIR)/include \
-I$(MMS_HANDLER_DIR)/include -MMD
ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
SUBMAKE_OPTS += KEEP_SYMBOLS=1
endif
DEBUG_CFLAGS = $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CFLAGS)
RELEASE_CFLAGS = $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CFLAGS)
......@@ -151,9 +160,9 @@ clean:
rm -fr $(BUILD_DIR) $(SRC_DIR)/*~
cleaner: clean
make -C $(MMS_LIB_DIR) clean
make -C $(MMS_OFONO_DIR) clean
make -C $(MMS_HANDLER_DIR) clean
make -C $(MMS_LIB_DIR) $(SUBMAKE_OPTS) clean
make -C $(MMS_OFONO_DIR) $(SUBMAKE_OPTS) clean
make -C $(MMS_HANDLER_DIR) $(SUBMAKE_OPTS) clean
$(GEN_DIR):
mkdir -p $@
......@@ -165,22 +174,22 @@ $(RELEASE_BUILD_DIR):
mkdir -p $@
mms_lib_debug_lib:
make -C $(MMS_LIB_DIR) debug
make -C $(MMS_LIB_DIR) $(SUBMAKE_OPTS) debug
mms_lib_release_lib:
make -C $(MMS_LIB_DIR) release
make -C $(MMS_LIB_DIR) $(SUBMAKE_OPTS) release
mms_ofono_debug_lib:
make -C $(MMS_OFONO_DIR) debug
make -C $(MMS_OFONO_DIR) $(SUBMAKE_OPTS) debug
mms_ofono_release_lib:
make -C $(MMS_OFONO_DIR) release
make -C $(MMS_OFONO_DIR) $(SUBMAKE_OPTS) release
mms_handler_debug_lib:
make -C $(MMS_HANDLER_DIR) debug
make -C $(MMS_HANDLER_DIR) $(SUBMAKE_OPTS) debug
mms_handler_release_lib:
make -C $(MMS_HANDLER_DIR) release
make -C $(MMS_HANDLER_DIR) $(SUBMAKE_OPTS) release
$(MMS_LIB_DEBUG_LIB): mms_lib_debug_lib
......@@ -214,4 +223,6 @@ $(DEBUG_EXE): $(DEBUG_EXE_DEPS) $(DEBUG_OBJS)
$(RELEASE_EXE): $(RELEASE_EXE_DEPS) $(RELEASE_OBJS)
$(LD) $(RELEASE_FLAGS) $(RELEASE_OBJS) $(RELEASE_LIBS) -o $@
# strip $@
ifeq ($(KEEP_SYMBOLS),0)
strip $@
endif
# -*- Mode: makefile -*-
# -*- Mode: gnu-makefile -*-
.PHONY: clean all debug release
......@@ -37,12 +37,23 @@ RELEASE_BUILD_DIR = $(BUILD_DIR)/release
CC = $(CROSS_COMPILE)gcc
LD = $(CC)
WARN = -Wall
ARFLAGS = rc
INCLUDES = -I$(SRC_DIR) -I$(INCLUDE_DIR) -I$(MMS_LIB_INCLUDE) -I$(GEN_DIR) -I.
CFLAGS = $(WARNINGS) $(INCLUDES) $(shell pkg-config --cflags $(PKGS)) -MMD
DEBUG_FLAGS = -g
RELEASE_FLAGS = -O2
DEBUG_DEFS = -DDEBUG
RELEASE_DEFS =
WARNINGS = -Wall
INCLUDES = -I$(SRC_DIR) -I$(INCLUDE_DIR) -I$(MMS_LIB_INCLUDE) -I$(GEN_DIR) -I.
CFLAGS += $(WARNINGS) $(INCLUDES) $(shell pkg-config --cflags $(PKGS)) -MMD
ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
endif
DEBUG_CFLAGS = $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CFLAGS)
RELEASE_CFLAGS = $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CFLAGS)
......
# -*- Mode: makefile -*-
# -*- Mode: gnu-makefile -*-
.PHONY: clean all debug release
......@@ -49,12 +49,25 @@ endif
CC = $(CROSS_COMPILE)gcc
LD = $(CC)
ARFLAGS = rc
DEBUG_FLAGS = -g
RELEASE_FLAGS = -O2
DEBUG_DEFS = -DDEBUG
RELEASE_DEFS =
WARNINGS = -Wall
INCLUDES = -I$(SRC_DIR) -I$(INCLUDE_DIR)
CFLAGS += $(WARNINGS) $(INCLUDES) $(shell pkg-config --cflags $(PKGS)) -MMD
DEBUG_CFLAGS = -g -DDEBUG $(CFLAGS)
RELEASE_CFLAGS = -O2 $(CFLAGS)
ARFLAGS = rc
ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
endif
DEBUG_CFLAGS = $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CFLAGS)
RELEASE_CFLAGS = $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CFLAGS)
#
# Files
......
# -*- Mode: makefile -*-
# -*- Mode: gnu-makefile -*-
.PHONY: clean all debug release
......@@ -47,14 +47,23 @@ RELEASE_BUILD_DIR = $(BUILD_DIR)/release
CC = $(CROSS_COMPILE)gcc
LD = $(CC)
WARN = -Wall
ARFLAGS = rc
INCLUDES = -I$(SRC_DIR) -I$(INCLUDE_DIR) -I$(MMS_LIB_INCLUDE) -I$(GEN_DIR) -I.
CFLAGS = $(INCLUDES) $(shell pkg-config --cflags $(PKGS)) -MMD
DEBUG_FLAGS = -g
RELEASE_FLAGS = -O2
DEBUG_DEFS = -DDEBUG
RELEASE_DEFS =
WARNINGS = -Wall
INCLUDES = -I$(SRC_DIR) -I$(INCLUDE_DIR) -I$(MMS_LIB_INCLUDE) -I$(GEN_DIR) -I.
CFLAGS += $(WARNINGS) $(INCLUDES) $(shell pkg-config --cflags $(PKGS)) -MMD
ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
endif
DEBUG_CFLAGS = $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CFLAGS)
RELEASE_CFLAGS = $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CFLAGS)
......
......@@ -32,7 +32,7 @@ MMS engine
%setup -q -n %{name}-%{version}
%build
make -C %{src} release
make -C %{src} KEEP_SYMBOLS=1 release
%install
rm -rf %{buildroot}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment