Commit 9b07b61d authored by Slava Monich's avatar Slava Monich

[mms-engine] Don't mess with CFLAGS because it's passed to submakes

parent a2b71f7e
......@@ -101,13 +101,15 @@ MMS_SETTINGS_RELEASE_LIB = $(MMS_SETTINGS_BUILD_DIR)/release/$(MMS_SETTINGS_LIB)
CC = $(CROSS_COMPILE)gcc
LD = $(CC)
DEBUG_FLAGS = -g
RELEASE_FLAGS = -O2
RELEASE_FLAGS =
DEBUG_DEFS = -DDEBUG
RELEASE_DEFS =
WARN = -Wall
CFLAGS = -fPIC $(shell pkg-config --cflags $(PKGS)) -I. -I$(GEN_DIR) \
-I$(MMS_LIB_DIR)/include -I$(MMS_CONNMAN_DIR)/include \
-I$(MMS_HANDLER_DIR)/include -I$(MMS_SETTINGS_DIR)/include -MMD
BASE_FLAGS = -fPIC $(CFLAGS)
FULL_CFLAGS = $(BASE_FLAGS) -I. -I$(GEN_DIR) -I$(MMS_LIB_DIR)/include \
-I$(MMS_CONNMAN_DIR)/include -I$(MMS_HANDLER_DIR)/include \
-I$(MMS_SETTINGS_DIR)/include -MMD -MP \
$(shell pkg-config --cflags $(PKGS))
ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
......@@ -119,15 +121,17 @@ SUBMAKE_OPTS += KEEP_SYMBOLS=1
endif
ifdef MMS_ENGINE_VERSION
CFLAGS += -DMMS_ENGINE_VERSION="$(MMS_ENGINE_VERSION)"
FULL_CFLAGS += -DMMS_ENGINE_VERSION="$(MMS_ENGINE_VERSION)"
endif
ifdef SAILFISH
CFLAGS += -DSAILFISH
FULL_CFLAGS += -DSAILFISH
endif
DEBUG_CFLAGS = $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CFLAGS)
RELEASE_CFLAGS = $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CFLAGS)
DEBUG_CFLAGS = $(FULL_CFLAGS) $(DEBUG_FLAGS) -DDEBUG
RELEASE_CFLAGS = $(FULL_CFLAGS) $(RELEASE_FLAGS) -O2
DEBUG_LDFLAGS = $(LDFLAGS) $(DEBUG_FLAGS)
RELEASE_LDFLAGS = $(LDFLAGS) $(RELEASE_FLAGS)
LIBS = $(shell pkg-config --libs $(LIB_PKGS)) -lmagic -ljpeg $(RESIZE_LIBS)
DEBUG_LIBS = \
......@@ -277,10 +281,10 @@ $(RELEASE_BUILD_DIR)/%.o : $(GEN_DIR)/%.c
$(CC) -c $(RELEASE_CFLAGS) -MT"$@" -MF"$(@:%.o=%.d)" $< -o $@
$(DEBUG_EXE): $(DEBUG_EXE_DEPS) $(DEBUG_OBJS)
$(LD) $(DEBUG_FLAGS) $(DEBUG_OBJS) $(DEBUG_LIBS) -o $@
$(LD) $(DEBUG_LDFLAGS) $(DEBUG_OBJS) $(DEBUG_LIBS) -o $@
$(RELEASE_EXE): $(RELEASE_EXE_DEPS) $(RELEASE_OBJS)
$(LD) $(RELEASE_FLAGS) $(RELEASE_OBJS) $(RELEASE_LIBS) -o $@
$(LD) $(RELEASE_LDFLAGS) $(RELEASE_OBJS) $(RELEASE_LIBS) -o $@
ifeq ($(KEEP_SYMBOLS),0)
strip $@
endif
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