rt/Makefile
author Florian Pose <fp@igh-essen.com>
Fri, 16 Dec 2005 15:41:49 +0000
changeset 37 481faf8a5f93
parent 28 801dc7eabf51
child 46 f2d7a73d2f32
permissions -rw-r--r--
Pfad korrigiert 4.
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
     1
# Comment/uncomment the following line to disable/enable debugging
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
     2
#DEBUG = y
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
     3
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
     4
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
     5
# Add your debugging flag (or not) to CFLAGS
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
     6
ifeq ($(DEBUG),y)
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
     7
  DEBFLAGS = -O -g -DSHORT_DEBUG # "-O" is needed to expand inlines
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
     8
else
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
     9
  DEBFLAGS = -O2
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    10
endif
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    12
CFLAGS += $(DEBFLAGS)
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    13
CFLAGS += -I.. 
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    14
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    15
RTLIB = /vol/projekte/msr_messen_steuern_regeln/linux/kernel_space/rt_lib-4.0.0-2.6krnl
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    17
#Suchpfad für die Dateien aus dem RT-Lib-Verzeichnis
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    18
VPATH := $(RTLIB)/msr-core:$(RTLIB)/msr-control:$(RTLIB)/msr-hwdriver:$(RTLIB)/msr-math:$(RTLIB)/msr-misc:$(RTLIB)/msr-utils
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    20
#Datei aus dem RT-Libverzeichnis für dies Projekt
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    21
RTSRC := msr_main.o msr_lists.o msr_charbuf.o msr_reg.o msr_interpreter.o msr_utils.o msr_messages.o msr_functiongen.o msr_base64.o msr_watchdog.o msr_proc.o msr_error_reg.o
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    23
ifneq ($(KERNELRELEASE),)
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    24
# call from kernel build system
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    27
EXTRA_CFLAGS := -I$(RTLIB)/msr-include -D_SIMULATION -I/usr/include -mhard-float
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    28
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    29
#EXTRA_LDFLAGS :=  -L/usr/lib -lm
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    30
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    31
msr_modul-y := msr_module.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    32
	msr_jitter.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    33
	rt_lib/msr-core/msr_lists.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    34
	rt_lib/msr-core/msr_main.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    35
	rt_lib/msr-core/msr_charbuf.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    36
	rt_lib/msr-core/msr_reg.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    37
	rt_lib/msr-core/msr_interpreter.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    38
	rt_lib/msr-core/msr_messages.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    39
	rt_lib/msr-core/msr_proc.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    40
	rt_lib/msr-core/msr_error_reg.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    41
	rt_lib/msr-utils/msr_utils.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    42
	rt_lib/msr-math/msr_base64.o \
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    43
	libm.o 
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    44
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    45
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    46
obj-m	:= msr_modul.o
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    47
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    48
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    49
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    50
else
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    51
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    52
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    53
KERNELDIR := /lib/modules/$(shell uname -r)/build
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    54
PWD       := $(shell pwd)
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    55
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    56
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    57
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    58
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    59
default:
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    60
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    61
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    62
endif
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    63
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    64
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    65
clean:
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    66
	rm -f core .depend
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    67
	rm -rf .tmp_versions
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    68
	find -L -maxdepth 3 -name "*.o" -exec rm {} \;	
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    69
	find -L -maxdepth 3 -name "*~" -exec rm {} \;	
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    70
	find -L -maxdepth 3 -name "*.cmd" -exec rm {} \;	
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    71
	find -L -maxdepth 3 -name "*.ko" -exec rm {} \;	
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    72
	find -L -maxdepth 3 -name "*.mod.c" -exec rm {} \;	
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    73
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    74
depend .depend dep:
28
801dc7eabf51 IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 16
diff changeset
    75
	$(CC) $(CFLAGS) -M *.c > .depend
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    76
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    77
10
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    78
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    79
ifeq (.depend,$(wildcard .depend))
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    80
include .depend
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    81
endif