author | Florian Pose <fp@igh-essen.com> |
Fri, 11 Nov 2005 10:55:22 +0000 | |
changeset 10 | 67c739ece5d5 |
parent 9 | 144d220c8ca0 |
child 13 | db0742533c10 |
permissions | -rw-r--r-- |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
1 |
#---------------------------------------------------------------- |
0 | 2 |
# |
3 |
# Makefile |
|
4 |
# |
|
5 |
# IgH EtherCAT-Treiber |
|
6 |
# |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
7 |
# $Id$ |
0 | 8 |
# |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
9 |
#---------------------------------------------------------------- |
0 | 10 |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
11 |
KERNEL_DIRS_FILE = ../kerneldirs.mk |
0 | 12 |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
13 |
ifeq ($(KERNEL_DIRS_FILE),$(wildcard $(KERNEL_DIRS_FILE))) |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
14 |
include $(KERNEL_DIRS_FILE) |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
15 |
else |
6
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
16 |
KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5 |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
17 |
RTAIDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13 |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
18 |
RTLIBDIR = rt_lib |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
19 |
endif |
6
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
20 |
|
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
21 |
CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ -DMODULE \ |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
22 |
-I$(KERNELDIR)/include -D_RTAI -I$(RTAIDIR)/include \ |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
23 |
-I$(RTLIBDIR)/msr-include |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
24 |
|
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
25 |
ifdef CONFIG_SMP |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
26 |
CFLAGS += -D__SMP__ -DSMP |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
27 |
endif |
0 | 28 |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
29 |
MODULE = ecat_8139too.o |
10
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
30 |
OBJ = ec_device.o ec_master.o ec_slave.o ec_command.o ec_types.o |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
31 |
SRC = $(OBJ:.o=.c) |
0 | 32 |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
33 |
#---------------------------------------------------------------- |
0 | 34 |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
35 |
all: .output_dirs .depend $(MODULE) |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
36 |
|
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
37 |
$(MODULE): $(OBJ) |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
38 |
$(LD) -r $(OBJ) -o $@ |
0 | 39 |
|
40 |
.c.o: |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
41 |
$(CC) $(CFLAGS) -c $< -o $@ |
0 | 42 |
|
43 |
doc docs: |
|
44 |
$(MAKE) -C .. doc |
|
45 |
||
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
46 |
.output_dirs: |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
47 |
@echo "x-- Directories -------------" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
48 |
@echo "| Kernel $(KERNELDIR)" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
49 |
@echo "| RTAI $(RTAIDIR)" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
50 |
@echo "| RT_lib $(RTLIBDIR)" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
51 |
@echo "x----------------------------" |
0 | 52 |
|
6
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
53 |
.depend: |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
54 |
$(CC) $(CFLAGS) -M $(SRC) > .depend |
0 | 55 |
|
56 |
clean: |
|
57 |
rm -f *.o *~ core .depend |
|
58 |
||
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
59 |
#---------------------------------------------------------------- |
10
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
60 |
|
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
61 |
ifeq (.depend,$(wildcard .depend)) |
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
62 |
include .depend |
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
63 |
endif |
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
64 |
|
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
65 |
#---------------------------------------------------------------- |