Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a08513ade0 | ||
|
|
1a57e01e07 | ||
|
|
6d4faf19b8 |
54
Makefile
54
Makefile
@@ -1,4 +1,8 @@
|
||||
# -*- Mode: makefile-gmake -*-
|
||||
#
|
||||
# LIBGLIBUTIL_PATH can be defined to point to libglibutil root directory
|
||||
# for side-by-side build.
|
||||
#
|
||||
|
||||
.PHONY: clean all debug release test
|
||||
.PHONY: print_debug_so print_release_so
|
||||
@@ -7,10 +11,15 @@
|
||||
.PHONY: print_debug_path print_release_path
|
||||
|
||||
#
|
||||
# Required packages
|
||||
# Library version
|
||||
#
|
||||
|
||||
PKGS = libglibutil glib-2.0 gobject-2.0
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 0
|
||||
VERSION_RELEASE = 37
|
||||
|
||||
# Version for pkg-config
|
||||
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
|
||||
|
||||
#
|
||||
# Default target
|
||||
@@ -19,15 +28,34 @@ PKGS = libglibutil glib-2.0 gobject-2.0
|
||||
all: debug release pkgconfig
|
||||
|
||||
#
|
||||
# Library version
|
||||
# Required packages
|
||||
#
|
||||
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 0
|
||||
VERSION_RELEASE = 36
|
||||
PKGS = glib-2.0 gobject-2.0
|
||||
|
||||
# Version for pkg-config
|
||||
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
|
||||
ifeq ($(LIBGLIBUTIL_PATH),)
|
||||
|
||||
# Assume that libglibutil devel package is installed
|
||||
PKGS += libglibutil
|
||||
|
||||
else
|
||||
|
||||
# Side-by-side build
|
||||
INCLUDES += -I$(LIBGLIBUTIL_PATH)/include
|
||||
DEBUG_LIBS = -L$(LIBGLIBUTIL_PATH)/build/debug -lglibutil
|
||||
RELEASE_LIBS = -L$(LIBGLIBUTIL_PATH)/build/release -lglibutil
|
||||
DEBUG_DEPS = libglibutil_debug
|
||||
RELEASE_DEPS = libglibutil_release
|
||||
|
||||
.PHONY: libglibutil_debug libglibutil_release
|
||||
|
||||
libglibutil_debug:
|
||||
make -C $(LIBGLIBUTIL_PATH) debug
|
||||
|
||||
libglibutil_release:
|
||||
make -C $(LIBGLIBUTIL_PATH) release
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# Library name
|
||||
@@ -92,7 +120,7 @@ COVERAGE_BUILD_DIR = $(BUILD_DIR)/coverage
|
||||
CC ?= $(CROSS_COMPILE)gcc
|
||||
LD = $(CC)
|
||||
WARNINGS = -Wall -Wstrict-aliasing -Wunused-result
|
||||
INCLUDES = -I$(INCLUDE_DIR)
|
||||
INCLUDES += -I$(INCLUDE_DIR)
|
||||
BASE_FLAGS = -fPIC
|
||||
FULL_CFLAGS = $(BASE_FLAGS) $(CFLAGS) $(DEFINES) $(WARNINGS) $(INCLUDES) \
|
||||
-MMD -MP $(shell pkg-config --cflags $(PKGS))
|
||||
@@ -110,8 +138,8 @@ ifneq ($(KEEP_SYMBOLS),0)
|
||||
RELEASE_FLAGS += -g
|
||||
endif
|
||||
|
||||
DEBUG_LDFLAGS = $(FULL_LDFLAGS) $(DEBUG_FLAGS)
|
||||
RELEASE_LDFLAGS = $(FULL_LDFLAGS) $(RELEASE_FLAGS)
|
||||
DEBUG_LDFLAGS = $(FULL_LDFLAGS) $(DEBUG_LIBS) $(DEBUG_FLAGS)
|
||||
RELEASE_LDFLAGS = $(FULL_LDFLAGS) $(RELEASE_LIBS) $(RELEASE_FLAGS)
|
||||
DEBUG_CFLAGS = $(FULL_CFLAGS) $(DEBUG_FLAGS) -DDEBUG
|
||||
RELEASE_CFLAGS = $(FULL_CFLAGS) $(RELEASE_FLAGS) -O2
|
||||
COVERAGE_CFLAGS = $(FULL_CFLAGS) $(COVERAGE_FLAGS) --coverage
|
||||
@@ -137,8 +165,8 @@ endif
|
||||
endif
|
||||
|
||||
$(PKGCONFIG): | $(BUILD_DIR)
|
||||
$(DEBUG_OBJS) $(DEBUG_SO): | $(DEBUG_BUILD_DIR)
|
||||
$(RELEASE_OBJS) $(RELEASE_SO): | $(RELEASE_BUILD_DIR)
|
||||
$(DEBUG_OBJS) $(DEBUG_SO): | $(DEBUG_BUILD_DIR) $(DEBUG_DEPS)
|
||||
$(RELEASE_OBJS) $(RELEASE_SO): | $(RELEASE_BUILD_DIR) $(RELEASE_DEPS)
|
||||
$(COVERAGE_OBJS) $(COVERAGE_LIB): | $(COVERAGE_BUILD_DIR)
|
||||
|
||||
#
|
||||
|
||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@@ -1,3 +1,10 @@
|
||||
libgbinder (1.0.37) unstable; urgency=low
|
||||
|
||||
* Allow side-by-side linking with libglibutil
|
||||
* Fixed compilation warnings
|
||||
|
||||
-- Slava Monich <slava.monich@jolla.com> Tue, 17 Mar 2020 20:15:11 +0200
|
||||
|
||||
libgbinder (1.0.36) unstable; urgency=low
|
||||
|
||||
* Allow overwriting CC
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: libgbinder
|
||||
Version: 1.0.36
|
||||
Version: 1.0.37
|
||||
Release: 0
|
||||
Summary: Binder client library
|
||||
Group: Development/Libraries
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Jolla Ltd.
|
||||
* Copyright (C) 2018-2019 Slava Monich <slava.monich@jolla.com>
|
||||
* Copyright (C) 2018-2020 Jolla Ltd.
|
||||
* Copyright (C) 2018-2020 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of BSD license as follows:
|
||||
*
|
||||
@@ -30,6 +30,8 @@
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "gbinder_ipc.h"
|
||||
#include "gbinder_driver.h"
|
||||
#include "gbinder_handler.h"
|
||||
@@ -341,7 +343,9 @@ gbinder_remote_request_complete(
|
||||
tx->reply = gbinder_local_reply_ref(reply);
|
||||
tx->state = GBINDER_IPC_LOOPER_TX_COMPLETE;
|
||||
/* Wake up the looper */
|
||||
(void)write(tx->pipefd[1], &done, sizeof(done));
|
||||
if (write(tx->pipefd[1], &done, sizeof(done)) <= 0) {
|
||||
GWARN("Failed to wake up the looper");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
GWARN("Unexpected state %d in request completion", tx->state);
|
||||
@@ -473,7 +477,9 @@ gbinder_ipc_looper_tx_handle(
|
||||
}
|
||||
|
||||
/* And wake up the looper */
|
||||
(void)write(tx->pipefd[1], &done, sizeof(done));
|
||||
if (write(tx->pipefd[1], &done, sizeof(done)) <= 0) {
|
||||
GWARN("Failed to wake up the looper");
|
||||
}
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Jolla Ltd.
|
||||
* Copyright (C) 2018-2019 Slava Monich <slava.monich@jolla.com>
|
||||
* Copyright (C) 2018-2020 Jolla Ltd.
|
||||
* Copyright (C) 2018-2020 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of BSD license as follows:
|
||||
*
|
||||
@@ -30,6 +30,8 @@
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "gbinder_driver.h"
|
||||
#include "gbinder_ipc.h"
|
||||
#include "gbinder_local_object_p.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Jolla Ltd.
|
||||
* Copyright (C) 2018-2019 Slava Monich <slava.monich@jolla.com>
|
||||
* Copyright (C) 2018-2020 Jolla Ltd.
|
||||
* Copyright (C) 2018-2020 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of BSD license as follows:
|
||||
*
|
||||
@@ -30,6 +30,8 @@
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "gbinder_driver.h"
|
||||
#include "gbinder_ipc.h"
|
||||
#include "gbinder_remote_object_p.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Jolla Ltd.
|
||||
* Copyright (C) 2018-2019 Slava Monich <slava.monich@jolla.com>
|
||||
* Copyright (C) 2018-2020 Jolla Ltd.
|
||||
* Copyright (C) 2018-2020 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of BSD license as follows:
|
||||
*
|
||||
@@ -14,8 +14,8 @@
|
||||
* 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.
|
||||
* 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
|
||||
@@ -30,6 +30,8 @@
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "gbinder_servicemanager_p.h"
|
||||
#include "gbinder_client_p.h"
|
||||
#include "gbinder_local_object_p.h"
|
||||
|
||||
Reference in New Issue
Block a user