Home | History | Annotate | Download | only in linux
      1 
      2 
      3 ##
      4 ##
      5 ## Directory Locations
      6 ##
      7 ##
      8 
      9 COMMON      := $(DK_ROOT)/stad
     10 COMSRC      := $(COMMON)/src
     11 TWD         := $(DK_ROOT)/TWD
     12 UTILS       := $(DK_ROOT)/utils
     13 TESTSRC     := $(DK_ROOT)/Test
     14 LINUX_PFORM := $(DK_ROOT)/platforms/os/linux
     15 PLATFORMS   := $(DK_ROOT)/platforms
     16 EXT_DRV     := $(DK_ROOT)/external_drivers
     17 TXN         := $(DK_ROOT)/Txn
     18 
     19 ##
     20 ##
     21 ## Make Flags
     22 ##
     23 ##
     24 
     25 #
     26 # Compile with FW1273 or FW1251
     27 #
     28 FW ?= 1273
     29 
     30 #
     31 # Compile with XCC support or not
     32 #
     33 XCC ?= n
     34 
     35 
     36 #
     37 # Compile with GEM support or not
     38 #
     39 GEM ?= n
     40 
     41 #
     42 # Choose the bus type (n for SDIO, y for WSPI)
     43 #
     44 WSPI ?= n
     45 
     46 #
     47 # Use periodic interrupt
     48 #
     49 INTR ?= y
     50 
     51 #
     52 # Enable or disable debugging
     53 #
     54 DEBUG ?= y
     55 KERNEL_DEBUGGER ?= n
     56 STRIP ?= y
     57 BMTRACE ?= n
     58 #
     59 # Enable or disable OS and init messages
     60 #
     61 INFO ?= n
     62 
     63 #
     64 # 1273 FPGA platform
     65 #
     66 FPGA1273 ?= n
     67 
     68 #
     69 # Enable trace buffer
     70 #
     71 TI_TRACE_BUFFER ?= n
     72 
     73 ##
     74 ##
     75 ## Driver Compilation Directives
     76 ##
     77 ##
     78 ifeq "$(HOST_PLATFORM)" "omap2430"	
     79 	DK_DEFINES += -D HOST_PLATFORM_OMAP2430
     80 endif
     81 ifeq "$(HOST_PLATFORM)" "omap3430"
     82 	DK_DEFINES += -D HOST_PLATFORM_OMAP3430
     83 endif
     84 ifeq "$(HOST_PLATFORM)" "zoom2"
     85 	DK_DEFINES += -D HOST_PLATFORM_ZOOM2
     86 endif
     87 ifeq "$(HOST_PLATFORM)" "zoom1"
     88 	DK_DEFINES += -D HOST_PLATFORM_ZOOM1
     89 endif
     90 
     91 ifeq ($(XCC),y)
     92     DK_DEFINES += -D XCC_MODULE_INCLUDED
     93 endif
     94 
     95 ifeq ($(GEM),y)
     96     DK_DEFINES += -D GEM_SUPPORTED
     97 endif
     98 
     99 ifeq ($(INTR),n)
    100     DK_DEFINES += -D PRIODIC_INTERRUPT
    101 endif    
    102 
    103 ifeq ($(DEBUG),y)
    104     DK_DEFINES += -D TI_DBG
    105     DK_DEFINES += -D REPORT_LOG
    106     DK_DEFINES += -O2
    107     DK_DEFINES += -D PRINTF_ROLLBACK
    108 else
    109     DK_DEFINES += -D TI_DBG
    110     DK_DEFINES += -U REPORT_LOG
    111     DK_DEFINES += -O2
    112 endif
    113 ifeq ($(KERNEL_DEBUGGER),y)
    114     DK_DEFINES += -g -O2
    115 	STRIP = n
    116 endif
    117 export KERNEL_DEBUGGER
    118 
    119 DK_DEFINES += -D __BYTE_ORDER_LITTLE_ENDIAN
    120 
    121 ifeq ($(TI_TRACE_BUFFER),y)
    122    DK_DEFINES += -D TI_TRACE_BUF
    123 endif
    124 
    125 ifeq ($(BMTRACE),y)
    126    DK_DEFINES += -D TIWLAN_BMTRACE
    127 endif
    128 
    129 ##
    130 ##
    131 ## Platform Compilation Directives
    132 ##
    133 ##
    134 
    135 #
    136 # Bus Driver
    137 #
    138 ifeq ($(WSPI),y)
    139     BUS_DRV = spi
    140     BUS_DRV_REMOVE = sdio
    141     BUS_DRIVER_MODULE = spi.ko
    142     PFORM_DEFINES += -D WSPI
    143 else
    144     BUS_DRV = sdio
    145     BUS_DRV_REMOVE = spi
    146     BUS_DRV = sdio
    147     BUS_DRV_REMOVE = spi
    148     BUS_DRIVER_MODULE = sdio.ko
    149 endif
    150 
    151 ifeq ($(INFO),y)
    152     PFORM_DEFINES += -D OS_INFO_MESSAGES
    153     PFORM_DEFINES += -D INIT_MESSAGES
    154 endif
    155 
    156 PFORM_DEFINES += -D HOST_COMPILE
    157 PFORM_DEFINES += -D FW_RUNNING_AS_STA
    158 PFORM_DEFINES += -D TNETW1273
    159 
    160 ifeq ($(FPGA1273),y)
    161     PFORM_DEFINES += -D FPGA1273_STAGE_
    162 endif
    163 
    164 ifeq ($(FULL_ASYNC),y)
    165     PFORM_DEFINES += -D FULL_ASYNC_MODE
    166 endif
    167 
    168 ifeq ($(USE_IRQ_ACTIVE_HIGH),y)
    169     PFORM_DEFINES += -D USE_IRQ_ACTIVE_HIGH
    170 endif
    171 
    172 ##
    173 ##
    174 ## Miscellaneous Compilation Directivcs
    175 ##
    176 ##
    177 
    178 EXTRA_CFLAGS += -fsigned-char
    179 EXTRA_CFLAGS += -D __LINUX__ -DTI_RANDOM_DEFAULT_MAC
    180 EXTRA_CFLAGS += $(DK_DEFINES)
    181 EXTRA_CFLAGS += $(PFORM_DEFINES)
    182