openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

Makefile.linux-x86-common-2_6 (1568B)


      1 #
      2 #  Copyright 2017 Broadcom
      3 #  
      4 #  This program is free software; you can redistribute it and/or modify
      5 #  it under the terms of the GNU General Public License, version 2, as
      6 #  published by the Free Software Foundation (the "GPL").
      7 #  
      8 #  This program is distributed in the hope that it will be useful, but
      9 #  WITHOUT ANY WARRANTY; without even the implied warranty of
     10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     11 #  General Public License version 2 (GPLv2) for more details.
     12 #  
     13 #  You should have received a copy of the GNU General Public License
     14 #  version 2 (GPLv2) along with this source code.
     15 #
     16 # $Id: Makefile.linux-x86-common-2_6,v 1.13 Broadcom SDK $
     17 # $Copyright: (c) 2005 Broadcom Corp.
     18 # All Rights Reserved.$
     19 
     20 CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=0
     21 ENDIAN = LE_HOST=1
     22 CFGFLAGS += -D$(ENDIAN)
     23 CFGFLAGS += -DBCM_PLATFORM_STRING=\"X86\"
     24 ifeq (,$(findstring -DSAL_BDE_DMA_MEM_DEFAULT,$(CFGFLAGS)))
     25 CFGFLAGS += -DSAL_BDE_DMA_MEM_DEFAULT=16
     26 endif
     27 
     28 # Extra variables.
     29 EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
     30 
     31 comma = ,
     32 basetarget = $(basename $(notdir $@))
     33 modname = $(basetarget)
     34 
     35 name-fix = $(subst $(comma),_,$(subst -,_,$1))
     36 basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
     37 modname_flags  = $(if $(filter 1,$(words $(modname))),\
     38 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
     39 
     40 ifneq ($(targetplat),user)
     41 # By default we exclude -Werror from x86 kernel builds
     42 BCM_CFLAGS   = -Wall
     43 include ${SDK}/make/Makefile.linux-kernel-2_6
     44 endif