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