few updates from RMerlin sources
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / net / et / Makefile
blob1e35814b4851bf1bb8caebdaa354028643a4396f
2 # Makefile for the Broadcom et driver
4 # Copyright (C) 2013, Broadcom Corporation. All Rights Reserved.
5 #
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
9 #
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 # SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 # $Id: Makefile,v 1.5 2010-12-07 04:47:36 $
21 ETSRCDIR := ../../../../../../src-rt-6.x.4708/et
23 et-objs := $(ETSRCDIR)/sys/et_linux.o $(ETSRCDIR)/sys/etc.o
25 ifeq ($(CONFIG_BUZZZ_FUNC),y)
26 subdir-ccflags-y += -O0 -fno-inline -finstrument-functions
27 endif # CONFIG_BUZZZ_FUNC
29 ifeq ($(CONFIG_ET_47XX),y)
30 et-objs += $(ETSRCDIR)/sys/etc47xx.o $(ETSRCDIR)/sys/etc_adm.o
31 et-objs += $(ETSRCDIR)/sys/etcgmac.o
32 EXTRA_CFLAGS += -DCFG_GMAC -DBCM47XX_CHOPS -DETROBO -DETADM -DBCMDMA64 -DBCMDMA32
33 endif
35 ifeq ($(CONFIG_BCM_FA),y)
36 et-objs += $(ETSRCDIR)/sys/etc_fa.o
37 EXTRA_CFLAGS += -DETFA
38 endif
40 ifeq ($(CONFIG_RGMII_BCM_FA),y)
41 EXTRA_CFLAGS += -DRGMII_BCM_FA
42 endif
44 obj-$(CONFIG_ET) := et.o
46 EXTRA_CFLAGS += -DDMA -Werror
47 ifeq ($(CONFIG_ET_ALL_PASSIVE_ON),y)
48 EXTRA_CFLAGS += -DET_ALL_PASSIVE_ON -DET_ALL_PASSIVE
49 else
50 ifeq ($(CONFIG_ET_ALL_PASSIVE_RUNTIME),y)
51 EXTRA_CFLAGS += -DET_ALL_PASSIVE
52 endif
53 endif # /* CONFIG_ET_ALL_PASSIVE_ON */
55 # Search for sources under src/et/sys or objects under src/et/linux
56 ifneq ($(wildcard $(src)/$(ETSRCDIR)/sys),)
57 EXTRA_CFLAGS += -I$(src)/$(ETSRCDIR)/sys -I$(src)/$(ETSRCDIR)/include
58 else
59 et-objs := $(ETSRCDIR)/linux/et.o
60 endif
62 ifneq ($(KERNELRELEASE),)
63 # kbuild part of makefile
64 else
65 # Normal makefile
66 KERNELDIR := $(BASEDIR)/components/opensource/linux/linux-2.6.36
67 all:
68 $(MAKE) -C $(KERNELDIR) M=`pwd`
70 clean:
71 $(MAKE) -C $(KERNELDIR) M=`pwd` clean
72 endif
74 clean-files += $(ETSRCDIR)/sys/*.o $(ETSRCDIR)/sys/.*.o.cmd