| 1 | ############################################################ |
|---|
| 2 | # Copyright (c) 2003-2011, Broadcom Corporation |
|---|
| 3 | # All Rights Reserved |
|---|
| 4 | # Confidential Property of Broadcom Corporation |
|---|
| 5 | # |
|---|
| 6 | # THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | # AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | # EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | # |
|---|
| 10 | # $brcm_Workfile: bkni.inc $ |
|---|
| 11 | # $brcm_Revision: Hydra_Software_Devel/14 $ |
|---|
| 12 | # $brcm_Date: 7/22/11 9:36a $ |
|---|
| 13 | # |
|---|
| 14 | # Module Description: |
|---|
| 15 | # |
|---|
| 16 | # Revision History: |
|---|
| 17 | # |
|---|
| 18 | # Created: 01/09/2007 by Jon Garrett |
|---|
| 19 | # |
|---|
| 20 | # $brcm_Log: /magnum/basemodules/kni/bkni.inc $ |
|---|
| 21 | # |
|---|
| 22 | # Hydra_Software_Devel/14 7/22/11 9:36a agin |
|---|
| 23 | # SWNOOS-473: Rename no-os to no_os. |
|---|
| 24 | # |
|---|
| 25 | # Hydra_Software_Devel/13 5/3/11 1:41p erickson |
|---|
| 26 | # SW7420-1819: add bare OS support to magnum basemodules |
|---|
| 27 | # |
|---|
| 28 | # Hydra_Software_Devel/12 12/27/10 4:11p erickson |
|---|
| 29 | # SW7405-705: add export BKNI_TRACK_MALLOCS=y option |
|---|
| 30 | # |
|---|
| 31 | # Hydra_Software_Devel/11 7/20/10 2:50p jfisher |
|---|
| 32 | # SW7572-30: Add ucos_ii support. |
|---|
| 33 | # |
|---|
| 34 | # Hydra_Software_Devel/10 1/21/10 10:57a kaiz |
|---|
| 35 | # SW35230-56: adding linuxpal support for Palladium emulation environment |
|---|
| 36 | # |
|---|
| 37 | # Hydra_Software_Devel/SW35230-56/1 1/18/10 6:42p kaiz |
|---|
| 38 | # SW35230-56: adding linuxpal support for Palladium emulation environment |
|---|
| 39 | # |
|---|
| 40 | # Hydra_Software_Devel/9 11/20/09 5:23p jgarrett |
|---|
| 41 | # SW7408-17: Adding bkernel |
|---|
| 42 | # |
|---|
| 43 | # Hydra_Software_Devel/8 9/15/09 1:37p erickson |
|---|
| 44 | # SW7400-2511: use B_REFSW_OS |
|---|
| 45 | # |
|---|
| 46 | # Hydra_Software_Devel/7 6/9/09 12:38p vsilyaev |
|---|
| 47 | # PR 55554: Fixed WIN32 build |
|---|
| 48 | # |
|---|
| 49 | # Hydra_Software_Devel/6 5/29/09 4:31p jessem |
|---|
| 50 | # PR 54881: Added linuxemu. |
|---|
| 51 | # |
|---|
| 52 | # Hydra_Software_Devel/5 6/19/08 4:35p cnovak |
|---|
| 53 | # PR43697: Clean up uCOS port and move back to Hyrdra branch. |
|---|
| 54 | # |
|---|
| 55 | # Hydra_Software_Devel/4 10/16/07 1:51p jessem |
|---|
| 56 | # PR 36129: Added linuxclient for use with Linux-based IKOS emulation |
|---|
| 57 | # platform. |
|---|
| 58 | # |
|---|
| 59 | # Hydra_Software_Devel/3 7/25/07 11:27a vsilyaev |
|---|
| 60 | # PR 32813: Added Windows MINGW support |
|---|
| 61 | # |
|---|
| 62 | # Hydra_Software_Devel/2 1/12/07 7:24a erickson |
|---|
| 63 | # PR25902: For linux kernel, the bkni.c file is compiled separately. |
|---|
| 64 | # |
|---|
| 65 | # Hydra_Software_Devel/1 1/11/07 2:37p jgarrett |
|---|
| 66 | # PR27004: Adding new .inc files |
|---|
| 67 | # |
|---|
| 68 | ############################################################ |
|---|
| 69 | |
|---|
| 70 | # |
|---|
| 71 | # Conditional Options for this Makefile |
|---|
| 72 | # |
|---|
| 73 | # N/A |
|---|
| 74 | # |
|---|
| 75 | |
|---|
| 76 | # Define this module |
|---|
| 77 | MAGNUM_MODULES += BKNI |
|---|
| 78 | |
|---|
| 79 | # Backward-compatibility |
|---|
| 80 | B_REFSW_OS ?= $(OS) |
|---|
| 81 | |
|---|
| 82 | # Options |
|---|
| 83 | ifeq ($(BKNI_TRACK_MALLOCS),y) |
|---|
| 84 | BKNI_DEFINES += BKNI_TRACK_MALLOCS=1 |
|---|
| 85 | endif |
|---|
| 86 | |
|---|
| 87 | # Module Includes |
|---|
| 88 | BKNI_INCLUDES += $(MAGNUM)/basemodules/kni/$(B_REFSW_OS) |
|---|
| 89 | |
|---|
| 90 | # Sanity check the OS value |
|---|
| 91 | BKNI_SUPPORTED_OS := linuxuser linuxkernel linuxclient linuxemu linuxpal nucleus ucos vxworks win32 bkernel ucos_ii bare no_os |
|---|
| 92 | ifeq ($(findstring $(B_REFSW_OS), $(BKNI_SUPPORTED_OS)),) |
|---|
| 93 | $(error [kni] OS must be one of the following: $(BKNI_SUPPORTED_OS)) |
|---|
| 94 | endif |
|---|
| 95 | |
|---|
| 96 | # For linux kernel, the bkni.c file is compiled separately. |
|---|
| 97 | ifneq ($(SYSTEM),linuxkernel) |
|---|
| 98 | # Include the basic KNI for this OS |
|---|
| 99 | ifeq ($(findstring $(B_REFSW_OS), win32),$(B_REFSW_OS)) |
|---|
| 100 | # win32 has bkni_$(B_REFSW_OS).c as the filename |
|---|
| 101 | BKNI_SOURCES += $(MAGNUM)/basemodules/kni/$(B_REFSW_OS)/bkni_$(B_REFSW_OS).c |
|---|
| 102 | else |
|---|
| 103 | # others are just bkni.c |
|---|
| 104 | BKNI_SOURCES += $(MAGNUM)/basemodules/kni/$(B_REFSW_OS)/bkni.c |
|---|
| 105 | endif |
|---|
| 106 | endif |
|---|
| 107 | |
|---|
| 108 | # Include ISO source for OS environments that use it |
|---|
| 109 | BKNI_ISO_OS := |
|---|
| 110 | ifeq ($(findstring $(B_REFSW_OS), ${BKNI_ISO_OS}), $(B_REFSW_OS)) |
|---|
| 111 | BKNI_SOURCES += $(MAGNUM)/basemodules/kni/$(B_REFSW_OS)/bkni_iso_c.c |
|---|
| 112 | endif |
|---|
| 113 | |
|---|
| 114 | |
|---|