fp@46: #------------------------------------------------------------------------------ fp@46: # fp@195: # Makefile fp@46: # fp@103: # $Id$ fp@46: # fp@197: # Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@197: # fp@197: # This file is part of the IgH EtherCAT Master. fp@197: # fp@197: # The IgH EtherCAT Master is free software; you can redistribute it fp@197: # and/or modify it under the terms of the GNU General Public License fp@197: # as published by the Free Software Foundation; version 2 of the License. fp@197: # fp@197: # The IgH EtherCAT Master is distributed in the hope that it will be fp@197: # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@197: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@197: # GNU General Public License for more details. fp@197: # fp@197: # You should have received a copy of the GNU General Public License fp@197: # along with the IgH EtherCAT Master; if not, write to the Free Software fp@197: # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@197: # fp@46: #------------------------------------------------------------------------------ fp@0: hm@28: ifneq ($(KERNELRELEASE),) fp@0: fp@46: #------------------------------------------------------------------------------ fp@195: # kbuild section fp@103: #------------------------------------------------------------------------------ hm@28: fp@181: ifneq ($(wildcard $(src)/rt.conf),) fp@181: include $(src)/rt.conf fp@181: else fp@181: MODULENAME := rt fp@181: endif hm@28: fp@181: obj-m := $(MODULENAME).o fp@181: fp@181: $(MODULENAME)-objs := msr_rt.o \ fp@181: rt_lib/msr-core/msr_lists.o \ fp@181: rt_lib/msr-core/msr_main.o \ fp@181: rt_lib/msr-core/msr_charbuf.o \ fp@181: rt_lib/msr-core/msr_reg.o \ fp@181: rt_lib/msr-core/msr_interpreter.o \ fp@181: rt_lib/msr-core/msr_messages.o \ fp@181: rt_lib/msr-core/msr_proc.o \ fp@181: rt_lib/msr-core/msr_error_reg.o \ fp@181: rt_lib/msr-utils/msr_utils.o \ fp@181: rt_lib/msr-utils/msr_time.o \ fp@181: rt_lib/msr-math/msr_base64.o \ fp@181: rt_lib/msr-math/msr_hex_bin.o \ fp@181: libm.o hm@28: fp@98: EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -D_SIMULATION \ fp@98: -I/usr/include -mhard-float \ fp@98: -DSVNREV=$(shell svnversion $(src)) -DUSER=$(USER) fp@46: fp@46: #------------------------------------------------------------------------------ hm@28: hm@28: else hm@28: fp@46: #------------------------------------------------------------------------------ fp@195: # default section fp@103: #------------------------------------------------------------------------------ hm@28: fp@181: ifneq ($(wildcard rt.conf),) fp@181: include rt.conf fp@50: else fp@181: MODULENAME := msr_rt fp@181: KERNEL := $(shell uname -r) fp@50: endif fp@50: fp@181: KERNELDIR := /lib/modules/$(KERNEL)/build fp@181: fp@50: modules: fp@181: $(MAKE) -C $(KERNELDIR) M=`pwd` fp@46: fp@46: clean: fp@50: $(MAKE) -C $(KERNELDIR) M=`pwd` clean fp@46: fp@181: install: fp@181: @./install.sh $(MODULENAME) $(KERNEL) fp@181: fp@46: #------------------------------------------------------------------------------ hm@28: hm@28: endif