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 () {
24 do_compile_append () {
25 cd ${S}/service-mgmt/sm-db
26 sqlite3 database/sm.db < database/create_sm_db.sql
27 sqlite3 database/sm.hb.db < database/create_sm_hb_db.sql
29 oe_runmake -e VER=0 VER_MJR=1 \
30 INCLUDES="-I. -I${S}/service-mgmt/sm-common/src " \
31 CCFLAGS="${CXXFLAGS} -fPIC" \
32 LDFLAGS="${LDFLAGS} -shared -rdynamic -L${S}/service-mgmt/sm-common/src " \
33 EXTRACCFLAGS="-D_TEST__AA__BB ${LDFLAGS} -L${S}/service-mgmt/sm-common/src "
36 do_install_append () {
37 cd ${S}/service-mgmt/sm-db
38 oe_runmake -e DEST_DIR=${D} BIN_DIR=${bindir} UNIT_DIR=${systemd_system_unitdir} \
39 LIB_DIR=${libdir} INC_DIR=${includedir} VER=0 VER_MJR=1 install
43 ${bindir}/sm_db_build \
44 ${libdir}/libsm_db.so.1 \
45 ${libdir}/libsm_db.so.0 \
46 ${localstatedir}/lib/sm \