Avoid conflicts with standard integer typedefs.
[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 if HAVE_KVS
82 libpers_common_la_SOURCES += \
83                               ../src/key-value-store/pers_low_level_db_access.c \
84                               ../src/key-value-store/crc32.c \
85                               ../src/key-value-store/database/kissdb.c \
86                               ../src/key-value-store/hashtable/md5c.c \
87                               ../src/key-value-store/hashtable/qhash.c \
88                               ../src/key-value-store/hashtable/qhasharr.c
89 endif
90
91
92 libpers_common_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
93
94
95 libpers_common_la_LIBADD = \
96                             $(DLT_LIBS)             \
97                             $(GIO_LIBS)             \
98                             $(GIO_UNIX_LIBS)        \
99                             $(GLIB_LIBS)            \
100                             $(DBUS_LIBS)            \
101                             $(GOBJECT_LIBS)
102
103 if HAVE_ITZAM
104 libpers_common_la_LIBADD += \
105                              $(ITZAM_LIBS)
106 endif
107
108 if HAVE_SQLITE
109 libpers_common_la_LIBADD += \
110                              $(SQLITE_LIBS)
111 endif
112
113 if HAVE_RAWDB
114 libpers_common_la_LIBADD += \
115                              $(RAWDB_LIBS)
116 endif
117
118 dbuspolicy_DATA = ../dbus_config/org.genivi.persistence.admin.conf
119
120 # Export interface description of org.genivi.persistence.admin DBus interface
121 dbusinterfaces_DATA = ../dbus_specifications/org.genivi.persistence.admin.xml
122
123 EXTRA_DIST = $(dbuspolicy_DATA) \
124              $(dbusinterfaces_DATA) 
125
126 # pkgconfig
127 pkgconfigdir = $(libdir)/pkgconfig
128 pkgconfig_DATA = ../pkgconfig/libperscommon.pc
129