#
# **************************************************************************************
# *
# * Copyright (c) 2013 Marvell International, Ltd.
# *
# **************************************************************************************
# *
# * Marvell Commercial License Option
# *
# * If you received this File from Marvell as part of a proprietary software release,
# * the File is considered Marvell Proprietary and Confidential Information, and is
# * licensed to you under the terms of the applicable Commercial License.
# *
# **************************************************************************************
# *
# * Marvell GPL License Option
# *
# * If you received this File from Marvell as part of a Linux distribution, this File
# * is licensed to you in accordance with the terms and conditions of the General Public
# * License Version 2, June 1991 (the "GPL License").  You can redistribute it and/or
# * modify it under the terms of the GPL License; either version 2 of the License, or
# * (at your option) any later version.
# *
# * This program is distributed in the hope that it will be useful, but WITHOUT ANY
# * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# * PARTICULAR PURPOSE.  See the GPL License for more details.
# *
# * You should have received a copy of the GNU General Public License along with this
# * program.  If not, see http://www.gnu.org/licenses/.
# *
# **************************************************************************************

# Makefile for Driver OS shim layer as linux kernel module. 

obj-m := dros.o

ARCH=arm
HOSTCC="/usr/bin/gcc"
CROSS_COMPILE="arm-marvell-linux-gnueabi-"

# start building the file list
#
dros-y := 

DROS_SRC=list.c mem_linux.c int_linux.c cpu_linux.c hw_linux.c \
           str_linux.c lassert.c dros_linux.c dros_kmod.c mesg_queue.c

MACROS =
#KERNELDIR=$(PRJROOT)/

# convert all paths to something kbuild can find
dros-y += $(DROS_SRC:%.c=%.o)

ccflags-y := $(CFLAGS_ASIC) \
	     -I$(src)/../include \
	     -I$(src)/../../include

#$(error $(ccflags-y))

CFLAGS_MODULE += -DDEBUG $(foreach MACRO,$(MACROS),-D$(MACRO))

all:
	@echo kerneldir = $(KERNELDIR)
	make -C $(KERNELDIR) M=$(PWD) modules

clean:
	make -C $(KERNELDIR) M=$(PWD) clean

