Make.defs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. The ASF licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. # * http://www.apache.org/licenses/LICENSE-2.0
  10. # * Unless required by applicable law or agreed to in writing,
  11. # software distributed under the License is distributed on an
  12. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  13. # KIND, either express or implied. See the License for the
  14. # specific language governing permissions and limitations
  15. # under the License.
  16. #
  17. # Configure NimBLE variables
  18. NIMBLE_CFG_TINYCRYPT := 1
  19. # Skip files that don't build for this port
  20. NIMBLE_IGNORE := $(NIMBLE_ROOT)/porting/nimble/src/hal_timer.c \
  21. $(NIMBLE_ROOT)/porting/nimble/src/os_cputime.c \
  22. $(NIMBLE_ROOT)/porting/nimble/src/os_cputime_pwr2.c
  23. include $(NIMBLE_ROOT)/porting/nimble/Makefile.defs
  24. CSRCS := $(NIMBLE_SRC)
  25. # Source files for NPL OSAL
  26. CSRCS += \
  27. $(wildcard $(NIMBLE_ROOT)/porting/npl/nuttx/src/*.c) \
  28. $(wildcard $(NIMBLE_ROOT)/nimble/transport/socket/src/*.c) \
  29. $(TINYCRYPT_SRC)
  30. # Source files for demo app
  31. CSRCS += $(NIMBLE_ROOT)/porting/examples/nuttx/ble.c
  32. MAINSRC = $(NIMBLE_ROOT)/porting/examples/nuttx/main.c
  33. # Add NPL and all NimBLE directories to include paths
  34. INC = \
  35. $(wildcard $(NIMBLE_ROOT)/porting/examples/nuttx/include) \
  36. $(NIMBLE_ROOT)/porting/npl/nuttx/include \
  37. $(NIMBLE_ROOT)/nimble/transport/socket/include \
  38. $(NIMBLE_INCLUDE) \
  39. $(TINYCRYPT_INCLUDE)
  40. INCLUDES := $(addprefix -I, $(INC))
  41. CFLAGS += \
  42. $(NIMBLE_CFLAGS) \
  43. $(INCLUDES) \
  44. $(TINYCRYPT_CFLAGS) \
  45. -DNIMBLE_CFG_CONTROLLER=0 -DOS_CFG_ALIGN_4=4 -DOS_CFG_ALIGNMENT=4 \
  46. -Ddefault_RNG_defined=0
  47. PROGNAME=nimble