1# Copyright 2020 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://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, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16 17import("$dir_pw_build/target_types.gni") 18import("$dir_pw_docgen/docs.gni") 19 20config("public_include_path") { 21 include_dirs = [ "public" ] 22 visibility = [ ":*" ] 23} 24 25config("backend_config") { 26 include_dirs = [ "public_overrides" ] 27 visibility = [ ":*" ] 28} 29 30config("armv6m") { 31 defines = [ "PW_INTERRUPT_CORTEX_M_ARMV6M=1" ] 32} 33 34config("armv7m") { 35 defines = [ "PW_INTERRUPT_CORTEX_M_ARMV7M=1" ] 36} 37 38config("armv8m") { 39 defines = [ "PW_INTERRUPT_CORTEX_M_ARMV8M=1" ] 40} 41 42_context_common = { 43 public_deps = [ "$dir_pw_interrupt:context.facade" ] 44 public_configs = [ 45 ":public_include_path", 46 ":backend_config", 47 ] 48 public = [ 49 "public/pw_interrupt_cortex_m/context_inline.h", 50 "public_overrides/pw_interrupt_backend/context_inline.h", 51 ] 52} 53 54# This targets provides the ARMv6-M backend for pw_interrupt's context facade. 55pw_source_set("context_armv6m") { 56 forward_variables_from(_context_common, "*") 57 public_configs += [ ":armv6m" ] 58} 59 60# This targets provides the ARMv7-M backend for pw_interrupt's context facade. 61pw_source_set("context_armv7m") { 62 forward_variables_from(_context_common, "*") 63 public_configs += [ ":armv7m" ] 64} 65 66# This targets provides the ARMv8-M backend for pw_interrupt's context facade. 67pw_source_set("context_armv8m") { 68 forward_variables_from(_context_common, "*") 69 public_configs += [ ":armv8m" ] 70} 71 72pw_doc_group("docs") { 73 sources = [ "docs.rst" ] 74} 75