2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 DEPENDS =+ "sqlite3-native"
20 do_configure_append () {
21 cd ${S}/service-mgmt/sm-db
23 rm -rf database/sm.db database/sm.hb.db
26 do_compile_append () {
27 cd ${S}/service-mgmt/sm-db
28 sqlite3 database/sm.db < database/create_sm_db.sql
29 sqlite3 database/sm.hb.db < database/create_sm_hb_db.sql
31 oe_runmake -e VER=0 VER_MJR=1 \
32 INCLUDES="-I. -I${S}/service-mgmt/sm-common/src " \
33 CCFLAGS="${CXXFLAGS} -fPIC" \
34 LDFLAGS="${LDFLAGS} -shared -rdynamic -L${S}/service-mgmt/sm-common/src " \
35 EXTRACCFLAGS="-D_TEST__AA__BB ${LDFLAGS} -L${S}/service-mgmt/sm-common/src "
38 do_install_append () {
39 cd ${S}/service-mgmt/sm-db
40 oe_runmake -e DEST_DIR=${D} BIN_DIR=${bindir} UNIT_DIR=${systemd_system_unitdir} \
41 LIB_DIR=${libdir} INC_DIR=${includedir} VER=0 VER_MJR=1 install
45 ${bindir}/sm_db_build \
46 ${libdir}/libsm_db.so.1 \
47 ${libdir}/libsm_db.so.0 \
48 ${localstatedir}/lib/sm \