1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24$(eval $(call gb_Library_Library,dbtools)) 25 26$(eval $(call gb_Library_add_package_headers,dbtools,connectivity_inc)) 27 28$(eval $(call gb_Library_add_precompiled_header,dbtools,$(SRCDIR)/connectivity/inc/pch/precompiled_dbtools)) 29 30$(eval $(call gb_Library_set_componentfile,dbtools,connectivity/source/dbtools/dbtools)) 31 32$(eval $(call gb_Library_set_include,dbtools,\ 33 $$(INCLUDE) \ 34 -I$(SRCDIR)/connectivity/inc \ 35 -I$(SRCDIR)/connectivity/inc/pch \ 36 -I$(SRCDIR)/connectivity/source/inc \ 37 -I$(WORKDIR)/CustomTarget/connectivity/source/parse \ 38)) 39 40$(eval $(call gb_Library_add_api,dbtools,\ 41 offapi \ 42 udkapi \ 43)) 44 45$(eval $(call gb_Library_add_defs,dbtools,\ 46 -DOOO_DLLIMPLEMENTATION_DBTOOLS \ 47 -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ 48 -DCONN_SHARED_RESOURCE_FILE=cnr \ 49)) 50 51$(eval $(call gb_Library_add_linked_libs,dbtools,\ 52 comphelper \ 53 cppuhelper \ 54 cppu \ 55 i18nisolang1 \ 56 jvmaccess \ 57 sal \ 58 stl \ 59 tl \ 60 utl \ 61 vos3 \ 62 $(gb_STDLIBS) \ 63)) 64 65# NETBSD: somewhere we have to instantiate the static data members. 66# NETBSD-1.2.1 doesn't know about weak symbols so the default mechanism for GCC won't work. 67# SCO and MACOSX: the linker does know about weak symbols, but we can't ignore multiple defined symbols 68ifeq ($(OS),NETBSD) 69$(eval $(call gb_Library_add_linked_libs,dbtools,ucbhelper)) 70endif 71ifeq ($(OS),SCO) 72$(eval $(call gb_Library_add_linked_libs,dbtools,ucbhelper)) 73endif 74ifeq ($(OS)$(COM),OS2GCC) 75$(eval $(call gb_Library_add_linked_libs,dbtools,ucbhelper)) 76endif 77ifeq ($(OS),MACOSX) 78$(eval $(call gb_Library_add_linked_libs,dbtools,ucbhelper)) 79endif 80 81 82$(eval $(call gb_Library_add_exception_objects,dbtools,\ 83 connectivity/source/sdbcx/VDescriptor \ 84 connectivity/source/sdbcx/VCollection \ 85 connectivity/source/sdbcx/VColumn \ 86 connectivity/source/sdbcx/VIndexColumn \ 87 connectivity/source/sdbcx/VKeyColumn \ 88 connectivity/source/sdbcx/VUser \ 89 connectivity/source/sdbcx/VGroup \ 90 connectivity/source/sdbcx/VTable \ 91 connectivity/source/sdbcx/VKey \ 92 connectivity/source/sdbcx/VIndex \ 93 connectivity/source/sdbcx/VCatalog \ 94 connectivity/source/sdbcx/VView \ 95 connectivity/source/commontools/predicateinput \ 96 connectivity/source/commontools/ConnectionWrapper \ 97 connectivity/source/commontools/TConnection \ 98 connectivity/source/commontools/conncleanup \ 99 connectivity/source/commontools/dbtools \ 100 connectivity/source/commontools/dbtools2 \ 101 connectivity/source/commontools/dbexception \ 102 connectivity/source/commontools/CommonTools \ 103 connectivity/source/commontools/TColumnsHelper \ 104 connectivity/source/commontools/TTableHelper \ 105 connectivity/source/commontools/TKeys \ 106 connectivity/source/commontools/TKey \ 107 connectivity/source/commontools/TKeyColumns \ 108 connectivity/source/commontools/TIndexes \ 109 connectivity/source/commontools/TIndex \ 110 connectivity/source/commontools/TIndexColumns \ 111 connectivity/source/commontools/DateConversion \ 112 connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData \ 113 connectivity/source/commontools/FDatabaseMetaDataResultSet \ 114 connectivity/source/commontools/TDatabaseMetaDataBase \ 115 connectivity/source/commontools/TPrivilegesResultSet \ 116 connectivity/source/commontools/TSkipDeletedSet \ 117 connectivity/source/commontools/dbmetadata \ 118 connectivity/source/commontools/TSortIndex \ 119 connectivity/source/commontools/dbcharset \ 120 connectivity/source/commontools/propertyids \ 121 connectivity/source/commontools/FValue \ 122 connectivity/source/commontools/paramwrapper \ 123 connectivity/source/commontools/statementcomposer \ 124 connectivity/source/commontools/RowFunctionParser \ 125 connectivity/source/commontools/sqlerror \ 126 connectivity/source/commontools/filtermanager \ 127 connectivity/source/commontools/parameters \ 128 connectivity/source/commontools/ParamterSubstitution \ 129 connectivity/source/commontools/DriversConfig \ 130 connectivity/source/commontools/formattedcolumnvalue \ 131 connectivity/source/commontools/BlobHelper \ 132 connectivity/source/commontools/warningscontainer \ 133 connectivity/source/parse/PColumn \ 134 connectivity/source/parse/sqliterator \ 135 connectivity/source/parse/sqlnode \ 136 connectivity/source/parse/wrap_sqlbison \ 137 connectivity/source/parse/internalnode \ 138 connectivity/source/simpledbt/charset_s \ 139 connectivity/source/simpledbt/staticdbtools_s \ 140 connectivity/source/simpledbt/parsenode_s \ 141 connectivity/source/simpledbt/parser_s \ 142 connectivity/source/resource/sharedresources \ 143)) 144 145$(eval $(call gb_Library_add_noexception_objects,dbtools,\ 146 connectivity/source/commontools/AutoRetrievingBase \ 147 connectivity/source/commontools/dbconversion \ 148 connectivity/source/parse/wrap_sqlflex \ 149 connectivity/source/simpledbt/refbase \ 150 connectivity/source/simpledbt/dbtfactory \ 151)) 152 153############ 154# BISON rule 155############ 156 157# FIXME: no proper dependencies of other files on Yacc's outputs - needs "make clean" on any changes! 158 159$(WORKDIR)/CustomTarget/connectivity/source/parse/sqlbison.cxx : TRTEMPFILE := $(shell $(gb_MKTEMP)) 160$(WORKDIR)/CustomTarget/connectivity/source/parse/sqlbison.cxx : $(SRCDIR)/connectivity/source/parse/sqlbison.y 161 tr -d "\015" < $< > $(TRTEMPFILE) 162 mkdir -p $(dir $@) 163 bison -v -d -l -pSQLyy -bsql -o $@ $(TRTEMPFILE) 164 rm $(TRTEMPFILE) 165 166$(WORKDIR)/CustomTarget/connectivity/source/parse/sqlbison.hxx : $(WORKDIR)/CustomTarget/connectivity/source/parse/sqlbison.cxx 167 168# Add depenedencies. This is so ugly and doesn't cover the fact evoab2 also uses it: 169 170$(SRCDIR)/connectivity/inc/connectivity/sqlparse.hxx : $(WORKDIR)/CustomTarget/connectivity/source/parse/sqlbison.hxx 171 172$(SRCDIR)/connectivity/source/parse/wrap_sqlbison.cxx : $(WORKDIR)/CustomTarget/connectivity/source/parse/sqlbison.cxx 173 174########### 175# FLEX rule 176########### 177 178$(WORKDIR)/CustomTarget/connectivity/source/parse/sqlflex.cxx : $(SRCDIR)/connectivity/source/parse/sqlflex.l 179 mkdir -p $(dir $@) 180 flex -i -8 -PSQLyy -L -o$@ $< 181 182$(SRCDIR)/connectivity/source/parse/wrap_sqlflex.cxx : $(WORKDIR)/CustomTarget/connectivity/source/parse/sqlflex.cxx $(WORKDIR)/CustomTarget/connectivity/source/parse/sqlbison.hxx 183 184# vim: set noet sw=4 ts=4: 185