summaryrefslogtreecommitdiffstats
path: root/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
blob: 664d58b03e5ebbbceb7b91275eaf7014fa2e947d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

$(eval $(call gb_StaticLibrary_StaticLibrary,mariadb-connector-c))

$(eval $(call gb_StaticLibrary_set_warnings_disabled,mariadb-connector-c))

$(eval $(call gb_StaticLibrary_use_unpacked,mariadb-connector-c,mariadb-connector-c))

$(eval $(call gb_StaticLibrary_set_include,mariadb-connector-c,\
	$$(INCLUDE) \
	-I$(call gb_UnpackedTarball_get_dir,mariadb-connector-c)/include \
))

# This is needed for MSVC 2008: it somehow finds a dlopen somewhere
# but the static library then contains unreferenced symbols.
# This macro enables a re-definition to native Win32 APIs in my_global.h.
## TODO missing enable: -D HAVE_COMPRESS
## (but then need to add "-lz" to mysqlcppconn linking)
$(eval $(call gb_StaticLibrary_add_cflags,mariadb-connector-c,-DHAVE_DLOPEN -D ENABLED_LOCAL_INFILE -D LIBMARIADB -D THREAD -DSQLITE_ENABLE_COLUMN_METADATA=1))

ifeq ($(OS),WNT)
$(eval $(call gb_StaticLibrary_add_cflags,mariadb-connector-c,-D_TIMESPEC_DEFINED -DHAVE_STRTOULL))
$(eval $(call gb_StaticLibrary_set_include,mariadb-connector-c,\
	$$(INCLUDE) \
	-I$(call gb_UnpackedTarball_get_dir,mariadb-connector-c)/win-iconv \
))
else
$(eval $(call gb_StaticLibrary_use_external,mariadb-connector-c,openssl_headers))
$(eval $(call gb_StaticLibrary_add_cflags,mariadb-connector-c,-DHAVE_OPENSSL))
endif

$(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
	UnpackedTarball/mariadb-connector-c/libmariadb/bmove_upp \
	UnpackedTarball/mariadb-connector-c/libmariadb/get_password \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_alloc \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_array \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_charset \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_compress \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_context \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_default \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_dtoa \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_errmsg \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_hash \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_init \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_io \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_list \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_ll2str \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_loaddata \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_net \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_password \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_pvio \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_sha1 \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_stmt_codec \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_string \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_time \
	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_async \
	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_charset \
	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_dyncol \
	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_lib \
	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_stmt \
	UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin \
	UnpackedTarball/mariadb-connector-c/plugins/auth/my_auth \
	UnpackedTarball/mariadb-connector-c/plugins/auth/dialog \
	UnpackedTarball/mariadb-connector-c/plugins/auth/caching_sha2_pw \
	UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_socket \
	$(if $(filter $(OS),WNT), \
		UnpackedTarball/mariadb-connector-c/libmariadb/win32_errmsg \
		UnpackedTarball/mariadb-connector-c/libmariadb/secure/win_crypt \
		UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv \
		, \
		UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_npipe \
		UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_shmem \
		UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt \
	) \
))

# vim: set noet sw=4 ts=4: