PCO Vers. 1.0.1 - Split of the low level database access
[profile/ivi/persistence-common-object.git] / src / Makefile.am
1 #######################################################################################################################
2 #
3 # Copyright (C) 2012 Continental Automotive Systems, Inc.
4 #
5 # Author: Ana.Chisca@continental-corporation.com
6 #         Petrica.Manoila@continental-corporation.com
7 #
8 # Makefile template for the persistence common library
9 #
10 # Process this file with automake to produce a Makefile.in.
11 #
12 # This Source Code Form is subject to the terms of the Mozilla Public
13 # License, v. 2.0. If a copy of the MPL was not distributed with this
14 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 #
16 #######################################################################################################################
17
18 ACLOCAL_AMFLAGS=-I m4
19
20 # Build objects into the subdirectory of the build directory corresponding to the subdirectory of the source files
21 # to avoid conflicts for pers_low_level_db_access.c files for different databases
22 AUTOMAKE_OPTIONS = subdir-objects
23
24 lib_LTLIBRARIES = libpers_common.la
25
26 include_HEADERS= \
27                 ../inc/protected/persComTypes.h \
28                 ../inc/protected/persComDataOrg.h \
29                 ../inc/protected/persComDbAccess.h \
30                 ../inc/protected/persComErrors.h \
31                 ../inc/protected/persComRct.h \
32                 ../inc/protected/persComIpc.h
33
34 libpers_common_la_CFLAGS = \
35                 -I ../inc/private -I ../inc/protected -I ../generated\
36                 $(DLT_CFLAGS)           \
37                 $(GIO_CFLAGS)           \
38                 $(GIO_UNIX_CFLAGS)      \
39                 $(GLIB_CFLAGS)          \
40                 $(GOBJECT_CFLAGS)       \
41                 $(DBUS_CFLAGS)
42
43 if HAVE_ITZAM
44 libpers_common_la_CFLAGS += \
45                              $(ITZAM_CFLAGS)
46 endif
47
48 if HAVE_SQLITE
49 libpers_common_la_CFLAGS += \
50                             $(SQLITE_CFLAGS)
51 endif
52
53 if HAVE_RAWDB
54 libpers_common_la_CFLAGS += \
55                             $(RAWDB_CFLAGS)
56 endif
57
58 libpers_common_la_SOURCES = \
59             ../generated/PasClientNotificationGen.c\
60             ../src/pers_data_organization.c\
61             ../src/pers_local_shared_db_access.c\
62             ../src/pers_resource_config_table.c\
63             ../src/pers_ipc.c\
64             ../src/pers_ipc_dbus.c
65
66 if HAVE_ITZAM
67 libpers_common_la_SOURCES += \
68                               ../src/itzam/pers_low_level_db_access.c
69 endif
70
71 if HAVE_SQLITE
72 libpers_common_la_SOURCES += \
73                               ../src/sqlite/pers_low_level_db_access.c
74 endif
75
76 if HAVE_RAWDB
77 libpers_common_la_SOURCES += \
78                               ../src/rawdb/pers_low_level_db_access.c
79 endif
80
81 libpers_common_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
82
83
84 libpers_common_la_LIBADD = \
85                             $(DLT_LIBS)             \
86                             $(GIO_LIBS)             \
87                             $(GIO_UNIX_LIBS)        \
88                             $(GLIB_LIBS)            \
89                             $(DBUS_LIBS)            \
90                             $(GOBJECT_LIBS)
91
92 if HAVE_ITZAM
93 libpers_common_la_LIBADD += \
94                              $(ITZAM_LIBS)
95 endif
96
97 if HAVE_SQLITE
98 libpers_common_la_LIBADD += \
99                              $(SQLITE_LIBS)
100 endif
101
102 if HAVE_RAWDB
103 libpers_common_la_LIBADD += \
104                              $(RAWDB_LIBS)
105 endif
106
107 dbuspolicy_DATA = ../dbus_config/org.genivi.persistence.admin.conf
108
109 # Export interface description of org.genivi.persistence.admin DBus interface
110 dbusinterfaces_DATA = ../dbus_specifications/org.genivi.persistence.admin.xml
111
112 EXTRA_DIST = $(dbuspolicy_DATA) \
113              $(dbusinterfaces_DATA) 
114
115 # pkgconfig
116 pkgconfigdir = $(libdir)/pkgconfig
117 pkgconfig_DATA = ../pkgconfig/libperscommon.pc
118