-SUBDIRS = testcase
+SUBDIRS = src testcase
+
+pcfiles = camera-hal-interface.pc
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = $(pcfiles)
+EXTRA_DIST = $(pcfiles)
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: camera-hal-interface
+Description: Multimedia Framework Camera HAL Interface library
+Requires: glib-2.0 dlog
+Version: $VERSION
+Libs: -L${libdir} -lcamera_hal_interface
+Cflags: -I${includedir}/
# Checks for library functions.
AC_CONFIG_FILES([
Makefile
+src/Makefile
+src/camera/Makefile
testcase/Makefile
testcase/camera/Makefile
+camera-hal-interface.pc
])
AC_OUTPUT
/*
+ * camera_hal_interface.h
+ *
* Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact: Jeongmo Yang <jm80.yang@samsung.com>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
*/
+
#include <tizen-camera.h>
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+</manifest>
Name: mm-hal-interface
Summary: Multimedia HAL Interface
-Version: 0.0.6
+Version: 0.0.7
Release: 0
Group: Multimedia/Development
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: gtest-devel
%description
Multimedia framework hardware abstraction layer interface package.
+%package devel
+Summary: Multimedia framework hardware abstraction layer interface development package
+Group: libdevel
+Version: %{version}
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Multimedia framework hardware abstraction layer interface development package.
+
+
%package -n camera-hal-gtests
Summary: gtest for camera HAL APIs
Group: Development/Tools
Version: %{version}
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: gtest-devel
%description -n camera-hal-gtests
gtest for camera HAL APIs.
install -m 644 include/radio/*.h %{buildroot}%{_includedir}
%make_install
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%post -n camera-hal-gtests -p /sbin/ldconfig
%postun -n camera-hal-gtests -p /sbin/ldconfig
%files
+%manifest mm-hal-interface.manifest
+%license LICENSE.APLv2
+%defattr(-,root,root,-)
+%{_libdir}/*.so.*
+
+%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
-%license LICENSE.APLv2
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/*.so
%files -n camera-hal-gtests
%manifest mm-hal-gtests.manifest
--- /dev/null
+SUBDIRS = camera
+
--- /dev/null
+lib_LTLIBRARIES = libcamera_hal_interface.la
+
+libcamera_hal_interface_la_SOURCES = camera_hal_interface.c
+libcamera_hal_interface_la_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) -I$(srcdir)/../../include/camera
+libcamera_hal_interface_la_LIBADD = $(GLIB_LIBS) $(DLOG_LIBS) -ldl
+
/*
+ * camera_hal_interface.c
+ *
* Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact: Jeongmo Yang <jm80.yang@samsung.com>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
*/
#ifdef HAVE_CONFIG_H
tmp_h->intf.set_batch_command = dlsym(tmp_h->dl_handle, "camera_set_batch_command");
if (tmp_h->intf.init == NULL || tmp_h->intf.deinit == NULL) {
- LOGE("could not get mandatory funtion. %p %1p", tmp_h->intf.init, tmp_h->intf.deinit);
+ LOGE("could not get mandatory function. %p %p", tmp_h->intf.init, tmp_h->intf.deinit);
ret = CAMERA_ERROR_INTERNAL;
goto _CAMERA_HAL_INTERFACE_GET_FAILED;
}
return ret;
}
-
# with gtest
bin_PROGRAMS = camera_hal_gtests
-camera_hal_gtests_SOURCES = camera_hal_tc.cpp camera_hal_interface.c
+camera_hal_gtests_SOURCES = \
+ camera_hal_tc.cpp
-camera_hal_gtests_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS)
-camera_hal_gtests_CPPFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) -I$(srcdir)/../../include/camera
+camera_hal_gtests_CPPFLAGS = \
+ $(GLIB_CFLAGS)\
+ $(DLOG_CFLAGS)\
+ -I$(srcdir)/../../include/camera
camera_hal_gtests_LDADD = \
- -ldl \
- -lgtest \
- $(GLIB_LIBS) \
+ -ldl\
+ -lgtest\
+ $(top_builddir)/src/camera/libcamera_hal_interface.la\
+ $(GLIB_LIBS)\
$(DLOG_LIBS)
#include <gtest/gtest.h>
#include <unistd.h>
#include <iostream>
-#include "camera_hal_interface.h"
+#include <camera_hal_interface.h>
using namespace std;