Shad Ansari | 2f7f9be | 2017-06-07 13:34:53 -0700 | [diff] [blame] | 1 | # Makefile for building system model as linux module |
| 2 | # |
| 3 | ifeq ("$(OS_KERNEL)", "linux") |
| 4 | |
| 5 | MOD_NAME = sysmodel |
| 6 | MOD_DEPS = utils common_api |
| 7 | MOD_TYPE = linux_lib |
| 8 | SRC_DIR = $(MODEL_OUT_DIR)/linux |
| 9 | srcs = bcmolt_model_types.c bcmolt_msg_pack.c |
| 10 | |
| 11 | $(shell mkdir -p $(SRC_DIR); ln -s $(MODEL_OUT_DIR)/*.[ch] $(SRC_DIR)/ 2> /dev/null) |
| 12 | |
| 13 | # If called by linux kernel builder - add include paths manually. |
| 14 | # It is not elegant, but we'll not have many linux modules |
| 15 | ifneq ("$(KBUILD_SRC)", "") |
| 16 | -include $(OUT_DIR_BASE)/Makefile.config.$(MOD_NAME) |
| 17 | endif |
| 18 | |
| 19 | endif |