Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / mysqlcppconn / makefile.mk
blobd7fa8a6f380f3fba9ffd174da153d76e765b43b9
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
28 PRJ=.
30 PRJNAME=mysqlcppconn
31 TARGET=so_mysqlcppconn
33 EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
35 # --- Settings -----------------------------------------------------
37 .INCLUDE : settings.mk
39 # --- Files --------------------------------------------------------
41 TARFILE_NAME=$(EXT_PROJECT_NAME)
42 TARFILE_MD5=0981bda6548a8c8233ffce2b6e4b2a23
43 ADDITIONAL_FILES=\
44 driver$/makefile.mk \
45 driver$/nativeapi$/makefile.mk \
46 driver$/nativeapi$/binding_config.h \
47 cppconn$/config.h
49 CONVERTFILES=\
50 cppconn$/build_config.h
52 # distro-specific builds want to link against a particular mysql library
53 # then they do not require mysql-devel package at runtime
54 # So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate patch
55 # and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql library
56 .IF "$(SYSTEM_MYSQL)" == "YES"
57 MYSQL_BINDING=static
58 .ELSE
59 MYSQL_BINDING=dynamic
60 .ENDIF
62 PATCH_FILES=\
63 $(TARFILE_NAME).patch \
64 $(TARFILE_NAME)-mysql-binding-$(MYSQL_BINDING).patch \
65 patches/default_to_protocol_tcp.patch
67 BUILD_DIR=driver
68 BUILD_ACTION = \
69 cd nativeapi \
70 && $(MAKE) $(MFLAGS) $(CALLMACROS) \
71 && cd .. \
72 && $(MAKE) $(MFLAGS) $(CALLMACROS)
74 # --- Targets ------------------------------------------------------
76 .INCLUDE : set_ext.mk
77 .INCLUDE : target.mk
78 .INCLUDE : tg_ext.mk
80 # --- post-build ---------------------------------------------------
82 # "normalize" the output structure, in that the C/C++ headers are
83 # copied to the canonic location in OUTPATH
84 # The allows, later on, to use the standard mechanisms to deliver those
85 # files, instead of delivering them out of OUTPATH/misc/build/..., which
86 # could cause problems
88 NORMALIZE_FLAG_FILE=so_normalized_$(TARGET)
90 $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE)
91 @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/driver$/mysql_driver.h $(INCCOM)
92 -@$(MKDIRHIER) $(INCCOM)$/cppconn
93 @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/cppconn$/* $(INCCOM)$/cppconn
94 @$(TOUCH) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
96 normalize: $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
98 $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE) : normalize