etisserant@391: #! gmake etisserant@391: etisserant@391: # etisserant@391: # Copyright (C) 2006 Laurent Bessard etisserant@391: # etisserant@391: # This file is part of canfestival, a library implementing the canopen etisserant@391: # stack etisserant@391: # etisserant@391: # This library is free software; you can redistribute it and/or etisserant@391: # modify it under the terms of the GNU Lesser General Public etisserant@391: # License as published by the Free Software Foundation; either etisserant@391: # version 2.1 of the License, or (at your option) any later version. etisserant@391: # etisserant@391: # This library is distributed in the hope that it will be useful, etisserant@391: # but WITHOUT ANY WARRANTY; without even the implied warranty of etisserant@391: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU etisserant@391: # Lesser General Public License for more details. etisserant@391: # etisserant@391: # You should have received a copy of the GNU Lesser General Public etisserant@391: # License along with this library; if not, write to the Free Software etisserant@391: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA etisserant@391: # etisserant@391: etisserant@391: #ifneq ($(KERNELRELEASE),) etisserant@391: # Kbuild part of Makefile etisserant@391: TARGET = SUB_TARGET etisserant@391: CAN_DRIVER = SUB_CAN_DRIVER etisserant@391: TIMERS_DRIVER = SUB_TIMERS_DRIVER etisserant@391: etisserant@391: EXTRA_CFLAGS := -I$(src)/../../include etisserant@391: EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET) etisserant@391: EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER) etisserant@391: EXTRA_CFLAGS += SUB_PROG_CFLAGS etisserant@391: etisserant@391: obj-m := can_virtual.o etisserant@391: can_virtual-objs = $(CAN_DRIVER).o etisserant@391: etisserant@391: #else etisserant@391: # Normal Makefile etisserant@391: PREFIX = SUB_PREFIX etisserant@391: KERNELDIR := SUB_KERNELDIR etisserant@391: etisserant@391: all: driver etisserant@391: etisserant@391: driver: etisserant@391: $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules etisserant@391: etisserant@391: clean: etisserant@391: $(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean etisserant@391: rm -f Module.symvers etisserant@391: etisserant@391: mrproper: clean etisserant@391: etisserant@391: install: etisserant@391: $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules_install etisserant@391: etisserant@391: #endif