1# 2# Makefile for the Broadcom et driver 3# 4# Copyright (C) 2015, 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. 17# 18# $Id: Makefile,v 1.5 2010-12-07 04:47:36 $ 19# 20 21ETSRCDIR := ../../../../../../../src/et 22 23et-objs := $(ETSRCDIR)/sys/et_linux.o $(ETSRCDIR)/sys/etc.o 24 25ifeq ($(CONFIG_BUZZZ_FUNC),y) 26subdir-ccflags-y += -O0 -fno-inline -finstrument-functions 27endif # CONFIG_BUZZZ_FUNC 28 29ifeq ($(CONFIG_ET_47XX),y) 30et-objs += $(ETSRCDIR)/sys/etc47xx.o $(ETSRCDIR)/sys/etc_adm.o 31et-objs += $(ETSRCDIR)/sys/etcgmac.o 32EXTRA_CFLAGS += -DCFG_GMAC -DBCM47XX_CHOPS -DETROBO -DETADM -DBCMDMA64 -DBCMDMA32 33endif 34 35ifeq ($(CONFIG_BCM_FA),y) 36et-objs += $(ETSRCDIR)/sys/etc_fa.o 37EXTRA_CFLAGS += -DETFA 38endif 39 40obj-$(CONFIG_ET) := et.o 41 42EXTRA_CFLAGS += -DDMA -Werror 43ifeq ($(CONFIG_ET_ALL_PASSIVE_ON),y) 44EXTRA_CFLAGS += -DET_ALL_PASSIVE_ON -DET_ALL_PASSIVE 45else 46ifeq ($(CONFIG_ET_ALL_PASSIVE_RUNTIME),y) 47EXTRA_CFLAGS += -DET_ALL_PASSIVE 48endif 49endif # /* CONFIG_ET_ALL_PASSIVE_ON */ 50 51# Search for sources under src/et/sys or objects under src/et/linux 52ifneq ($(wildcard $(src)/$(ETSRCDIR)/sys),) 53EXTRA_CFLAGS += -I$(src)/$(ETSRCDIR)/sys -I$(src)/$(ETSRCDIR)/include 54else 55et-objs := $(ETSRCDIR)/linux/et.o 56endif 57 58ifneq ($(KERNELRELEASE),) 59# kbuild part of makefile 60else 61# Normal makefile 62KERNELDIR := $(BASEDIR)/components/opensource/linux/linux-2.6.36 63all: 64 $(MAKE) -C $(KERNELDIR) M=`pwd` 65 66clean: 67 $(MAKE) -C $(KERNELDIR) M=`pwd` clean 68endif 69 70clean-files += $(ETSRCDIR)/sys/*.o $(ETSRCDIR)/sys/.*.o.cmd 71