fp@224: #------------------------------------------------------------------------------ fp@224: # fp@224: # Makefile fp@224: # fp@232: # Sample module for use with IgH MSR library. fp@232: # fp@224: # $Id$ fp@224: # fp@224: # Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@224: # fp@224: # This file is part of the IgH EtherCAT Master. fp@224: # fp@224: # The IgH EtherCAT Master is free software; you can redistribute it fp@224: # and/or modify it under the terms of the GNU General Public License fp@246: # as published by the Free Software Foundation; either version 2 of the fp@246: # License, or (at your option) any later version. fp@224: # fp@224: # The IgH EtherCAT Master is distributed in the hope that it will be fp@224: # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@224: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@224: # GNU General Public License for more details. fp@224: # fp@224: # You should have received a copy of the GNU General Public License fp@224: # along with the IgH EtherCAT Master; if not, write to the Free Software fp@224: # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@224: # fp@246: # The right to use EtherCAT Technology is granted and comes free of fp@246: # charge under condition of compatibility of product made by fp@246: # Licensee. People intending to distribute/sell products based on the fp@246: # code, have to sign an agreement to guarantee that products using fp@246: # software based on IgH EtherCAT master stay compatible with the actual fp@246: # EtherCAT specification (which are released themselves as an open fp@246: # standard) as the (only) precondition to have the right to use EtherCAT fp@246: # Technology, IP and trade marks. fp@246: # fp@224: #------------------------------------------------------------------------------ fp@224: fp@232: MODULE := ec_msr_sample fp@224: fp@224: #------------------------------------------------------------------------------ fp@224: # kbuild section fp@224: #------------------------------------------------------------------------------ fp@224: fp@232: ifneq ($(KERNELRELEASE),) fp@224: fp@232: obj-m := $(MODULE).o fp@224: fp@232: $(MODULE)-objs := msr_sample.o \ fp@224: rt_lib/msr-core/msr_lists.o \ fp@224: rt_lib/msr-core/msr_main.o \ fp@224: rt_lib/msr-core/msr_charbuf.o \ fp@224: rt_lib/msr-core/msr_reg.o \ fp@224: rt_lib/msr-core/msr_interpreter.o \ fp@224: rt_lib/msr-core/msr_messages.o \ fp@224: rt_lib/msr-core/msr_proc.o \ fp@224: rt_lib/msr-core/msr_error_reg.o \ fp@224: rt_lib/msr-utils/msr_utils.o \ fp@224: rt_lib/msr-utils/msr_time.o \ fp@224: rt_lib/msr-math/msr_base64.o \ fp@224: rt_lib/msr-math/msr_hex_bin.o \ fp@224: libm.o fp@224: fp@232: EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \ fp@232: -D_SIMULATION -mhard-float fp@224: fp@224: #------------------------------------------------------------------------------ fp@224: # default section fp@224: #------------------------------------------------------------------------------ fp@224: fp@224: else fp@232: fp@232: ifneq ($(wildcard kernel.conf),) fp@232: include kernel.conf fp@232: else fp@224: KERNEL := $(shell uname -r) fp@224: endif fp@224: fp@267: KERNEL_DIR := /lib/modules/$(KERNEL)/build fp@267: CURRENT_DIR := $(shell pwd) fp@224: fp@224: modules: fp@267: $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) fp@224: fp@224: clean: fp@267: $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean fp@224: fp@224: install: fp@232: @./install.sh $(MODULE) $(KERNEL) fp@232: fp@232: endif fp@224: fp@224: #------------------------------------------------------------------------------