1# Copyright 2024 The Bazel Authors. All rights reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("@rules_cc//cc:cc_library.bzl", "cc_library") 16load("@rules_cc//cc:cc_shared_library.bzl", "cc_shared_library") 17 18licenses(["notice"]) 19 20cc_library( 21 name = "headers", 22 hdrs = ["public/dynamic_answer.h"], 23 includes = ["public"], 24 visibility = ["//visibility:private"], 25) 26 27cc_library( 28 name = "answer", 29 srcs = ["dynamic_answer.c"], 30 visibility = ["//visibility:private"], 31 deps = [":headers"], 32) 33 34cc_shared_library( 35 name = "shared_library", 36 visibility = ["//visibility:private"], 37 deps = [":answer"], 38) 39 40# Forces linkage as a shared library. 41cc_library( 42 name = "dynamic_answer", 43 srcs = [":shared_library"], 44 visibility = ["//visibility:public"], 45 deps = [":headers"], 46) 47