fp@46: #------------------------------------------------------------------------------ fp@46: # fp@195: # Makefile fp@46: # fp@103: # $Id$ fp@46: # fp@1618: # Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@1618: # fp@1618: # This file is part of the IgH EtherCAT Master. fp@1618: # fp@1618: # The IgH EtherCAT Master is free software; you can redistribute it fp@1618: # and/or modify it under the terms of the GNU General Public License fp@1618: # as published by the Free Software Foundation; version 2 of the License. fp@1618: # fp@1618: # The IgH EtherCAT Master is distributed in the hope that it will be fp@1618: # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@1618: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@1618: # GNU General Public License for more details. fp@1618: # fp@1618: # You should have received a copy of the GNU General Public License fp@1618: # along with the IgH EtherCAT Master; if not, write to the Free Software fp@1618: # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@1618: # 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