lib: add prefixes to enums to avoid name clashes on Windows (like ERROR)
[barry.git] / src / Makefile.am
blobf75c3ad0381c7d901616af72539e9712ebf49ea2
2 # The following version numbers are:  current:revision:age
4 # See also: http://sources.redhat.com/autobook/autobook/autobook_91.html
6 # Current - number of the current interface of the library
7 # Revision - implementation number of most recent interface
8 # Age - number of previous additional interfaces supported by this library
10 # Libtool uses the following calculation for Linux:
12 #    major = current - age
13 #    suffix = major.age.revision
15 # Therefore a libtool version of 1.4.0 will translate to a filename of:
16 #    libbarry.so.1.0.4
18 # Other operating systems just use current.revision, most of the time,
19 # and age is only used to subtract from current.
21 # Therefore, if you are careful never to increment the major version
22 # unless there is an incompatible break, you can get away with a
23 # two digit version number, and leave age as 0, always.
25 # Only ever increment the first 2 numbers in this version:
26 LIB_BARRY_VERSION = 0:17:0
28 # Disable the default -I. -I$(srcdir) -I$(topdir), etc, but $(top_builddir) is
29 # needed for config.h
30 DEFAULT_INCLUDES = -I$(top_builddir)
31 #INCLUDES = @PACKAGE_CXXFLAGS@ -I@LIBUSB_INC_PATH@
32 #INCLUDES = $(LIBUSB_CFLAGS) $(OPENSSL_CFLAGS)
33 INCLUDES = $(LIBUSB_CFLAGS)
34 #AM_CXXFLAGS = -ansi -Wall -fno-strict-aliasing -g -D__DEBUG_MODE__
35 AM_CFLAGS = -Wall -fno-strict-aliasing -g -D__BARRY_LIBRARY_BUILD__
36 AM_CXXFLAGS = -ansi -Wall -fno-strict-aliasing -g -D__BARRY_LIBRARY_BUILD__
37 AM_LDFLAGS =
38 if WITH_GCCVISIBILITY
39 AM_CFLAGS += -D__BARRY_HAVE_GCCVISIBILITY__ -fvisibility=hidden
40 #AM_CXXFLAGS += -D__BARRY_HAVE_GCCVISIBILITY__ -fvisibility=hidden -fvisibility-inlines-hidden
41 AM_CXXFLAGS += -D__BARRY_HAVE_GCCVISIBILITY__ -fvisibility=hidden
42 #AM_LDFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
43 AM_LDFLAGS += -fvisibility=hidden
44 endif
45 include_barrydir = ${includedir}/barry
48 ## Boost library usage - required for serialization support, but optional
50 #BOOSTFLAG = -D__BARRY_BOOST_MODE__ -I../../../../boost/rootdir/include/boost-1_33_1
51 #LDBOOST = ../../../../boost/rootdir/lib/libboost_serialization-gcc-mt-1_33_1.a
52 ##BOOSTFLAG =
53 ##LDBOOST =
55 # Heavy duty C++ warnings
56 #WARNFLAGS = -ansi -pedantic -Wall -W -Wold-style-cast -Wfloat-equal -Wwrite-strings -Wno-long-long
57 #WARNFLAGS = -ansi -pedantic -Wall -W -Weffc++ -Woverloaded-virtual -Wold-style-cast -Wfloat-equal -Wwrite-strings -Wno-long-long -Werror
59 #LDFLAGS = ../../external/rootdir/libusb/lib/libusb.a $(LDBOOST) -lpthread $(LDDEBUG)
61 # To use gettext
62 datadir = @datadir@
63 localedir = $(datadir)/locale
64 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
67 # libbarry - main USB protocol interface library
68 # libbarrydp - '.debug' parser library
69 # libbarryjdwp - java debug server library
70 # libbarrysync - utility functions and classes for syncing and vformats
71 # libbarrybackup - utility classes for reading/writing Barry backup files
73 lib_LTLIBRARIES = libbarry.la libbarrydp.la libbarryjdwp.la
74 if WITH_SYNC
75 lib_LTLIBRARIES += libbarrysync.la
76 endif
77 if WITH_BACKUP
78 lib_LTLIBRARIES += libbarrybackup.la
79 endif
81 include_barry_HEADERS = barry.h barrysync.h barrybackup.h \
82         dll.h \
83         builder.h \
84         common.h \
85         configfile.h \
86         controller.h \
87         m_mode_base.h \
88         m_desktop.h \
89         m_raw_channel.h \
90         m_desktoptmpl.h \
91         m_ipmodem.h \
92         m_serial.h \
93         m_javaloader.h \
94         m_jvmdebug.h \
95         data.h \
96         error.h \
97         ldif.h \
98         log.h \
99         parser.h \
100         pin.h \
101         probe.h \
102         protocol.h \
103         record.h \
104         modem.h \
105         r_recur_base.h \
106         r_calendar.h \
107         r_calllog.h \
108         r_contact.h \
109         r_folder.h \
110         r_memo.h \
111         r_message_base.h \
112         r_message.h \
113         r_pin_message.h \
114         r_saved_message.h \
115         r_servicebook.h \
116         r_sms.h \
117         r_task.h \
118         r_timezone.h \
119         dataqueue.h \
120         router.h \
121         socket.h \
122         time.h \
123         threadwrap.h \
124         vsmartptr.h \
125         usbwrap.h \
126         version.h \
127         pppfilter.h \
128         sha1.h \
129         iconv.h \
130         cod.h \
131         bmp.h \
132         s11n-boost.h \
133         dp_codinfo.h \
134         j_manager.h \
135         j_server.h \
136         vformat.h \
137         vbase.h \
138         vcard.h \
139         vevent.h \
140         vjournal.h \
141         vtodo.h \
142         scoped_lock.h \
143         semaphore.h \
144         backup.h \
145         restore.h \
146         tzwrapper.h
148 noinst_HEADERS = cbarry.h \
149         base64.h \
150         record-internal.h \
151         bmp-internal.h \
152         cod-internal.h \
153         packet.h \
154         protostructs.h \
155         debug.h \
156         endian.h \
157         strnlen.h \
158         dp_parser.h \
159         j_message.h \
160         j_jdwp.h \
161         tarfile.h \
162         clog.h
164 EXTRA_DIST = convo.awk \
165         legal.txt
167 libbarry_la_SOURCES = dll.h \
168         builder.h parser.h \
169         time.h time.cc \
170         base64.h base64.cc \
171         bmp.h bmp-internal.h bmp.cc \
172         cod.h cod-internal.h cod.cc \
173         data.h data.cc \
174         usbwrap.h usbwrap.cc \
175         pin.h pin.cc \
176         probe.h probe.cc \
177         common.h common.cc \
178         configfile.h configfile.cc \
179         error.h error.cc \
180         ldif.h ldif.cc \
181         log.h log.cc \
182         socket.cc \
183         router.cc \
184         dataqueue.cc \
185         threadwrap.cc \
186         protocol.h protostructs.h protocol.cc \
187         record.h record-internal.h record.cc \
188         r_recur_base.h r_recur_base.cc \
189         r_calendar.h r_calendar.cc \
190         r_calllog.h r_calllog.cc \
191         r_command.cc \
192         r_contact.h r_contact.cc \
193         r_dbdb.cc \
194         r_folder.h r_folder.cc \
195         r_memo.h r_memo.cc \
196         r_message_base.h r_message_base.cc \
197         r_recordstate.cc \
198         r_servicebook.h r_servicebook.cc \
199         r_sms.h r_sms.cc \
200         r_task.h r_task.cc \
201         r_timezone.h r_timezone.cc \
202         packet.h packet.cc \
203         controller.h controller.cc \
204         m_mode_base.h m_mode_base.cc \
205         m_desktop.h m_desktop.cc \
206         m_raw_channel.h m_raw_channel.cc \
207         m_ipmodem.h m_ipmodem.cc \
208         m_serial.h m_serial.cc \
209         m_javaloader.h m_javaloader.cc \
210         m_jvmdebug.h m_jvmdebug.cc \
211         version.h version.cc \
212         pppfilter.h pppfilter.cc \
213         sha1.h sha1.cc \
214         iconv.h iconv.cc
215 #libbarry_la_LIBADD = $(LTLIBOBJS) $(LIBUSB_LIBS) $(OPENSSL_LIBS)
216 libbarry_la_LIBADD = $(LTLIBOBJS) $(LIBUSB_LIBS) $(ZLIB_LIBS) @LTLIBICONV@
217 libbarry_la_LDFLAGS = -version-info ${LIB_BARRY_VERSION}
219 libbarrydp_la_SOURCES = \
220         dp_parser.h dp_parser.cc \
221         dp_codinfo.h dp_codinfo.cc
222 libbarrydp_la_LIBADD = libbarry.la
223 libbarrydp_la_LDFLAGS = -version-info ${LIB_BARRY_VERSION}
225 libbarryjdwp_la_SOURCES = \
226         j_record.cc \
227         j_jdwp.h j_jdwp.cc \
228         j_message.h j_message.cc \
229         j_server.h j_server.cc \
230         j_manager.h j_manager.cc
231 libbarryjdwp_la_LIBADD = libbarry.la libbarrydp.la $(LIBUSB_LIBS)
232 libbarryjdwp_la_LDFLAGS = -version-info ${LIB_BARRY_VERSION}
234 if WITH_SYNC
235 libbarrysync_la_SOURCES = \
236         vformat.h vformat.c \
237         vbase.h vbase.cc \
238         vcard.h vcard.cc \
239         vevent.h vevent.cc \
240         vjournal.h vjournal.cc \
241         vtodo.h vtodo.cc \
242         tzwrapper.h tzwrapper.cc
243 # if we set CFLAGS and CXXFLAGS ourselves, we need to include
244 # AM_*FLAGS as well... this only seems to matter for compile flags,
245 # not link flags
246 libbarrysync_la_CFLAGS = $(AM_CFLAGS) $(GLIB2_CFLAGS)
247 libbarrysync_la_CXXFLAGS = $(AM_CXXFLAGS) $(GLIB2_CFLAGS)
248 libbarrysync_la_LIBADD = libbarry.la $(GLIB2_LIBS)
249 libbarrysync_la_LDFLAGS = -version-info ${LIB_BARRY_VERSION}
250 endif
252 if WITH_BACKUP
253 libbarrybackup_la_SOURCES = \
254         tarfile.cc tarfile-ops-nt.cc \
255         backup.h backup.cc \
256         restore.h restore.cc
257 libbarrybackup_la_CFLAGS = $(AM_CFLAGS) $(LIBTAR_CFLAGS) $(LIBZ_CFLAGS)
258 libbarrybackup_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBTAR_CFLAGS) $(LIBZ_CFLAGS)
259 libbarrybackup_la_LIBADD = libbarry.la $(LIBTAR_LIBS) $(LIBZ_LIBS)
260 libbarrybackup_la_LDFLAGS = -version-info ${LIB_BARRY_VERSION}
261 endif
263 ##if DO_TEST
264 ##      bin_PROGRAMS += test-base64 test-data test-time
266 ##      test_base64_SOURCES = base64.h base64.cc
267 ##      test_data_SOURCES = data.h data.cc
268 ##      test_time_SOURCES = time.h time.cc
269 ##endif