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