1# 2# Makefile for the Broadcom IGS Layer 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.3 2008-08-13 20:20:16 $ 19# 20 21IGSSRCDIR := ../../../../../../../src/router/emf/igs 22IGSCSRCDIR := ../../../../../../../src/emf/igs 23EMFDIR := ../../../../../../../src/router/emf 24 25IGS_OBJS := $(IGSCSRCDIR)/igsc.o $(IGSCSRCDIR)/igsc_sdb.o $(IGSSRCDIR)/igs_linux.o \ 26 $(IGSCSRCDIR)/osl_linux.o 27 28# Search for sources under src/router/emf/igs 29ifneq ($(wildcard $(src)/$(IGSSRCDIR)),) 30 EXTRA_CFLAGS += -I$(SRCBASE)/router/emf/igs -I$(SRCBASE)/router/emf/emf 31 EXTRA_CFLAGS += -I$(SRCBASE)/include/emf/igs -I$(SRCBASE)/include/emf/emf 32 igs-objs := $(IGS_OBJS) 33else 34 igs-objs := $(EMFDIR)/igs.o 35endif 36 37obj-$(CONFIG_EMF) := igs.o 38 39ifeq ($(CONFIG_BUZZZ_FUNC),y) 40subdir-ccflags-y += -O0 -fno-inline -finstrument-functions 41endif # CONFIG_BUZZZ_FUNC 42 43ifneq ($(KERNELRELEASE),) 44# kbuild part of makefile 45else 46# Normal makefile 47KERNELDIR := $(BASEDIR)/components/opensource/linux/linux-2.6.36 48all: 49 $(MAKE) -C $(KERNELDIR) M=`pwd` 50clean: 51 $(MAKE) -C $(KERNELDIR) M=`pwd` clean 52endif 53 54clean-files += $(IGSCSRCDIR)/*.o $(IGSSRCDIR)/*.o $(IGSCSRCDIR)/.*.o.cmd $(IGSSRCDIR)/.*.o.cmd 55