author | Florian Pose <fp@igh-essen.com> |
Fri, 18 Nov 2005 11:48:24 +0000 | |
changeset 20 | 7dd6216fb7cf |
parent 16 | f04e93b8af0f |
child 22 | e8c2cd004e0b |
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 |
|
16
f04e93b8af0f
?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents:
13
diff
changeset
|
11 |
CONFIG_FILE = ../ethercat.conf |
0 | 12 |
|
16
f04e93b8af0f
?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents:
13
diff
changeset
|
13 |
ifeq ($(CONFIG_FILE),$(wildcard $(CONFIG_FILE))) |
f04e93b8af0f
?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents:
13
diff
changeset
|
14 |
include $(CONFIG_FILE) |
9
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 |
16
f04e93b8af0f
?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents:
13
diff
changeset
|
18 |
RTLIBDIR = rt_lib |
f04e93b8af0f
?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents:
13
diff
changeset
|
19 |
GCC_SYSTEMDIR = /usr/lib/gcc-lib/i486-suse-linux/3.3/include |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
20 |
endif |
6
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
21 |
|
13
db0742533c10
Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents:
10
diff
changeset
|
22 |
CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ \ |
16
f04e93b8af0f
?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents:
13
diff
changeset
|
23 |
-DMODULE -I$(KERNELDIR)/include -nostdinc \ |
f04e93b8af0f
?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents:
13
diff
changeset
|
24 |
-isystem $(GCC_SYSTEMDIR) |
6
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
25 |
|
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
26 |
ifdef CONFIG_SMP |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
27 |
CFLAGS += -D__SMP__ -DSMP |
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
28 |
endif |
0 | 29 |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
30 |
MODULE = ecat_8139too.o |
13
db0742533c10
Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents:
10
diff
changeset
|
31 |
OBJ = drv_8139too.o ec_device.o ec_master.o \ |
db0742533c10
Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents:
10
diff
changeset
|
32 |
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
|
33 |
SRC = $(OBJ:.o=.c) |
0 | 34 |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
35 |
#---------------------------------------------------------------- |
0 | 36 |
|
13
db0742533c10
Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents:
10
diff
changeset
|
37 |
all: .output_dirs depend $(MODULE) |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
38 |
|
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
39 |
$(MODULE): $(OBJ) |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
40 |
$(LD) -r $(OBJ) -o $@ |
0 | 41 |
|
42 |
.c.o: |
|
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
43 |
$(CC) $(CFLAGS) -c $< -o $@ |
0 | 44 |
|
45 |
doc docs: |
|
46 |
$(MAKE) -C .. doc |
|
47 |
||
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
48 |
.output_dirs: |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
49 |
@echo "x-- Directories -------------" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
50 |
@echo "| Kernel $(KERNELDIR)" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
51 |
@echo "| RTAI $(RTAIDIR)" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
52 |
@echo "| RT_lib $(RTLIBDIR)" |
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
53 |
@echo "x----------------------------" |
0 | 54 |
|
13
db0742533c10
Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents:
10
diff
changeset
|
55 |
.depend depend dep: |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
56 |
$(CC) $(CFLAGS) -M $(SRC) > .depend |
0 | 57 |
|
58 |
clean: |
|
59 |
rm -f *.o *~ core .depend |
|
60 |
||
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
61 |
#---------------------------------------------------------------- |
10
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
62 |
|
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
63 |
ifeq (.depend,$(wildcard .depend)) |
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
64 |
include .depend |
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
65 |
endif |
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
66 |
|
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
67 |
#---------------------------------------------------------------- |