Commit c60c1349 authored by Slava Monich's avatar Slava Monich

[libmce-glib] Hide internal symbols. JB#43321

If nothing else, this makes the library file smaller by reducing
the size of the dynamic symbol table.
parent fb4d97ce
......@@ -63,10 +63,7 @@ RELEASE_BUILD_DIR = $(BUILD_DIR)/release
# Tools and flags
#
ifndef CC
CC = $(CROSS_COMPILE)gcc
endif
CC ?= $(CROSS_COMPILE)gcc
LD = $(CC)
DEFINES += -DGLIB_DISABLE_DEPRECATION_WARNINGS
WARNINGS = -Wall -Wno-unused-parameter -Wno-multichar
......@@ -74,14 +71,12 @@ INCLUDES = -I$(INCLUDE_DIR) -I$(GEN_DIR)
BASE_FLAGS = -fPIC $(CFLAGS)
FULL_CFLAGS = $(BASE_FLAGS) $(DEFINES) $(WARNINGS) $(INCLUDES) -MMD -MP \
$(shell pkg-config --cflags $(PKGS))
FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,$(LIB_SONAME)
FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,$(LIB_SONAME) \
-Wl,--version-script=$(LIB_NAME).map
DEBUG_FLAGS = -g
RELEASE_FLAGS =
ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif
KEEP_SYMBOLS ?= 0
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
endif
......@@ -193,11 +188,9 @@ $(PKGCONFIG): $(LIB_NAME).pc.in Makefile
# Install
#
INSTALL_PERM = 644
INSTALL = install
INSTALL_DIRS = $(INSTALL) -d
INSTALL_FILES = $(INSTALL) -m $(INSTALL_PERM)
INSTALL_FILES = $(INSTALL) -m 644
INSTALL_LIB_DIR = $(DESTDIR)/usr/lib
INSTALL_INCLUDE_DIR = $(DESTDIR)/usr/include/$(LIB_NAME)
......
{
global:
mce_*;
local:
*;
};
/*
* Copyright (C) 2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
* Copyright (C) 2016-2020 Jolla Ltd.
* Copyright (C) 2016-2020 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
......@@ -13,9 +13,9 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Jolla Ltd nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
* 3. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
......@@ -60,6 +60,7 @@ enum mce_proxy_signal {
static guint mce_proxy_signals[SIGNAL_COUNT] = { 0 };
typedef GObjectClass MceProxyClass;
GType mce_proxy_get_type() MCE_INTERNAL;
G_DEFINE_TYPE(MceProxy, mce_proxy, G_TYPE_OBJECT)
#define PARENT_CLASS mce_proxy_parent_class
#define MCE_PROXY_TYPE (mce_proxy_get_type())
......
/*
* Copyright (C) 2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
* Copyright (C) 2016-2020 Jolla Ltd.
* Copyright (C) 2016-2020 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
......@@ -13,9 +13,9 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Jolla Ltd nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
* 3. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
......@@ -37,7 +37,7 @@
#ifndef MCE_PROXY_H
#define MCE_PROXY_H
#include "mce_types.h"
#include "mce_types_p.h"
typedef struct mce_proxy_priv MceProxyPriv;
struct _ComNokiaMceSignal;
......@@ -58,26 +58,31 @@ typedef void
MceProxy*
mce_proxy_new(
void);
void)
MCE_INTERNAL;
MceProxy*
mce_proxy_ref(
MceProxy* proxy);
MceProxy* proxy)
MCE_INTERNAL;
void
mce_proxy_unref(
MceProxy* proxy);
MceProxy* proxy)
MCE_INTERNAL;
gulong
mce_proxy_add_valid_changed_handler(
MceProxy* proxy,
MceProxyFunc fn,
void* arg);
void* arg)
MCE_INTERNAL;
void
mce_proxy_remove_handler(
MceProxy* proxy,
gulong id);
gulong id)
MCE_INTERNAL;
#endif /* MCE_PROXY_H */
......
/*
* Copyright (C) 2020 Jolla Ltd.
* Copyright (C) 2020 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* any official policies, either expressed or implied.
*/
#ifndef MCE_TYPES_PRIVATE_H
#define MCE_TYPES_PRIVATE_H
#include <mce_types.h>
/* Macros */
#define MCE_INTERNAL G_GNUC_INTERNAL
#endif /* MCE_TYPES_PRIVATE_H */
/*
* Local Variables:
* mode: C
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*/
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