1#
2# Broadcom BCM57XX Gigabit Ethernet driver make file.
3#
4# $Id: Makefile,v 1.3 2008-05-02 22:49:54 $
5#
6
7B57SRCDIR := ../../../../../bcm57xx
8SHAREDSRCDIR := ../../../../../shared
9
10obj-$(CONFIG_BCM57XX) := bcm57xx.o
11
12bcm57xx-objs := $(B57SRCDIR)/linux/b57um.o $(B57SRCDIR)/linux/b57proc.o \
13		$(B57SRCDIR)/linux/b57diag.o \
14		$(B57SRCDIR)/sys/tigon3.o $(B57SRCDIR)/sys/autoneg.o \
15                $(B57SRCDIR)/sys/5701rls.o $(B57SRCDIR)/sys/tcp_seg.o \
16		$(SHAREDSRCDIR)/hndgige.o
17
18# If source directory src/bcm57xx exists, build objects from there
19ifneq ($(wildcard $(src)/$(B57SRCDIR)/sys),)
20
21EXTRA_CFLAGS += -DDBG=0 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT
22EXTRA_CFLAGS += -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT -DINCLUDE_5701_AX_FIX=1
23EXTRA_CFLAGS += -I$(src)/$(B57SRCDIR)/linux -I$(src)/$(B57SRCDIR)/sys \
24		-I$(src)/$(B57SRCDIR)/include
25
26EXTRA_CFLAGS += -DLINUX_HYBRID_POSTPROCESSING_REMOVAL
27# Otherwise, use object module(s) in this directory
28else
29
30bcm57xx-objs := $(B57SRCDIR)/linux/bcm57xx.o
31
32endif
33
34EXTRA_CFLAGS += -DPKTC
35
36ifneq ($(KERNELRELEASE),)
37# kbuild part of makefile
38else
39# Normal makefile
40KERNELDIR := ../../../../../linux/linux-2.6
41all:
42	$(MAKE) -C $(KERNELDIR) M=`pwd`
43
44clean:
45
46endif
47
48clean-files += $(B57SRCDIR)/sys/.*.o.cmd \
49	       $(B57SRCDIR)/linux/.*.o.cmd \
50	       $(SHAREDSRCDIR)/hndgige.o $(SHAREDSRCDIR)/.hndgige.o.cmd
51