diff --git a/qcow_utils/libqcow_utils.pc.in b/qcow_utils/libqcow_utils.pc.in new file mode 100644 index 0000000000..a5f0f5fe6b --- /dev/null +++ b/qcow_utils/libqcow_utils.pc.in @@ -0,0 +1,8 @@ +bslot=@BSLOT@ +include_dir=@INCLUDE_DIR@ + +Name: libqcow_utils +Description: QCOW2 shared library. +Version: ${bslot} +CFlags: -I${include_dir} +Libs: -lqcow_utils diff --git a/qcow_utils/platform2_preinstall.sh b/qcow_utils/platform2_preinstall.sh new file mode 100755 index 0000000000..5029010336 --- /dev/null +++ b/qcow_utils/platform2_preinstall.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Copyright 2018 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +v=$1 +include_dir=$2 +target_dir=$3 + +sed \ + -e "s/@BSLOT@/${v}/g" \ + -e "s:@INCLUDE_DIR@:${include_dir}:g" \ + "qcow_utils/libqcow_utils.pc.in" > "${target_dir}/libqcow_utils.pc" diff --git a/qcow_utils/src/qcow_utils.h b/qcow_utils/src/qcow_utils.h index 1bddeec1d4..e7db91192a 100644 --- a/qcow_utils/src/qcow_utils.h +++ b/qcow_utils/src/qcow_utils.h @@ -6,5 +6,13 @@ // Exported interface to basic qcow functionality to be used from C. +#ifdef __cplusplus +extern "C" { +#endif + // Create a basic, empty qcow2 file that can grow to `virtual_size` at `path`. int create_qcow_with_size(const char *path, uint64_t virtual_size); + +#ifdef __cplusplus +}; +#endif