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