10 |
10 |
11 #------------------------------------------------------------------------------ |
11 #------------------------------------------------------------------------------ |
12 # Kbuild-Abschnitt |
12 # Kbuild-Abschnitt |
13 #------------------------------------------------------------------------------ |
13 #------------------------------------------------------------------------------ |
14 |
14 |
15 obj-m := msr_modul.o |
15 ifneq ($(wildcard $(src)/rt.conf),) |
|
16 include $(src)/rt.conf |
|
17 else |
|
18 MODULENAME := rt |
|
19 endif |
16 |
20 |
17 msr_modul-objs := msr_module.o \ |
21 obj-m := $(MODULENAME).o |
18 rt_lib/msr-core/msr_lists.o \ |
22 |
19 rt_lib/msr-core/msr_main.o \ |
23 $(MODULENAME)-objs := msr_rt.o \ |
20 rt_lib/msr-core/msr_charbuf.o \ |
24 rt_lib/msr-core/msr_lists.o \ |
21 rt_lib/msr-core/msr_reg.o \ |
25 rt_lib/msr-core/msr_main.o \ |
22 rt_lib/msr-core/msr_interpreter.o \ |
26 rt_lib/msr-core/msr_charbuf.o \ |
23 rt_lib/msr-core/msr_messages.o \ |
27 rt_lib/msr-core/msr_reg.o \ |
24 rt_lib/msr-core/msr_proc.o \ |
28 rt_lib/msr-core/msr_interpreter.o \ |
25 rt_lib/msr-core/msr_error_reg.o \ |
29 rt_lib/msr-core/msr_messages.o \ |
26 rt_lib/msr-utils/msr_utils.o \ |
30 rt_lib/msr-core/msr_proc.o \ |
27 rt_lib/msr-utils/msr_time.o \ |
31 rt_lib/msr-core/msr_error_reg.o \ |
28 rt_lib/msr-math/msr_base64.o \ |
32 rt_lib/msr-utils/msr_utils.o \ |
29 rt_lib/msr-math/msr_hex_bin.o \ |
33 rt_lib/msr-utils/msr_time.o \ |
30 libm.o |
34 rt_lib/msr-math/msr_base64.o \ |
|
35 rt_lib/msr-math/msr_hex_bin.o \ |
|
36 libm.o |
31 |
37 |
32 EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -D_SIMULATION \ |
38 EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -D_SIMULATION \ |
33 -I/usr/include -mhard-float \ |
39 -I/usr/include -mhard-float \ |
34 -DSVNREV=$(shell svnversion $(src)) -DUSER=$(USER) |
40 -DSVNREV=$(shell svnversion $(src)) -DUSER=$(USER) |
35 |
41 |
39 |
45 |
40 #------------------------------------------------------------------------------ |
46 #------------------------------------------------------------------------------ |
41 # Default-Abschnitt |
47 # Default-Abschnitt |
42 #------------------------------------------------------------------------------ |
48 #------------------------------------------------------------------------------ |
43 |
49 |
44 ifneq ($(wildcard ethercat.conf),) |
50 ifneq ($(wildcard rt.conf),) |
45 include ethercat.conf |
51 include rt.conf |
46 else |
52 else |
47 KERNELDIR = /usr/src/linux |
53 MODULENAME := msr_rt |
|
54 KERNEL := $(shell uname -r) |
48 endif |
55 endif |
49 |
56 |
|
57 KERNELDIR := /lib/modules/$(KERNEL)/build |
|
58 |
50 modules: |
59 modules: |
51 $(MAKE) -C $(KERNELDIR) M=`pwd` modules |
60 $(MAKE) -C $(KERNELDIR) M=`pwd` |
52 |
61 |
53 clean: |
62 clean: |
54 $(MAKE) -C $(KERNELDIR) M=`pwd` clean |
63 $(MAKE) -C $(KERNELDIR) M=`pwd` clean |
55 |
64 |
|
65 install: |
|
66 @./install.sh $(MODULENAME) $(KERNEL) |
|
67 |
56 #------------------------------------------------------------------------------ |
68 #------------------------------------------------------------------------------ |
57 |
69 |
58 endif |
70 endif |