blob: 258f45f09b9a8749eadf322c0c61d64ed076ca37 [file] [log] [blame]
# OS abstraction layer
#
MOD_NAME = os
MOD_TYPE = lib
MOD_INC_DIRS = $(SRC_DIR) $(SRC_DIR)/$(OS)
MOD_INC_DIRS += $(OS_PLATFORM_DIR) $(CONFIG_DIR)
MOD_SUPPRESS_OS_DEP = y
ifeq ("$(OS)", "threadx")
MOD_DEPS = threadx bsp
MOD_INC_DIRS += $(SUBSYSTEM)/sys/inc
MOD_DEFS = -DBCMOS_TRACE_IN_DEV_LOG
endif
ifeq ("$(OS)", "posix")
ENABLE_MSG_QUEUE_DOMAIN_SOCKET ?= y
ENABLE_MSG_QUEUE_UDP_SOCKET ?= y
endif
ifeq ("$(ENABLE_MSG_QUEUE_DOMAIN_SOCKET)", "y")
MOD_DEFS += -DBCMOS_MSG_QUEUE_DOMAIN_SOCKET
endif
ifeq ("$(ENABLE_MSG_QUEUE_UDP_SOCKET)", "y")
MOD_DEFS += -DBCMOS_MSG_QUEUE_UDP_SOCKET
endif
ifeq ("$(BUF_IN_DMA_MEM)", "y")
EXTRA_CFLAGS += -DBCMOS_BUF_IN_DMA_MEM
BUF_DATA_UNIT_SIZE ?= 1024
EXTRA_CFLAGS += -DBCMOS_BUF_DATA_UNIT_SIZE=$(BUF_DATA_UNIT_SIZE)
endif
ifneq ("$(BUF_POOL_SIZE)", "")
ifeq ("$(BUF_POOL_BUF_SIZE)", "")
BUF_POOL_BUF_SIZE = 4096
endif
EXTRA_CFLAGS += -DBCMOS_BUF_POOL_SIZE=$(BUF_POOL_SIZE) -DBCMOS_BUF_POOL_BUF_SIZE=$(BUF_POOL_BUF_SIZE)
endif
srcs = bcmos_common.c bcmos_errno.c bcmos_hash_table.c bcmos_rw_lock.c $(OS)/bcmos_system.c
ifeq ("$(DEBUG)", "y")
MOD_DEFS += -DBCMOS_MEM_DEBUG -DBCMOS_SYS_UNITTEST
endif
ifeq ("$(SUBSYSTEM)", "embedded")
USE_LINT = yes
endif
#EXTRA_DEFINES += -DBCMOS_SYS_UNITTEST