drivers/Makefile
author Florian Pose <fp@igh-essen.com>
Fri, 11 Nov 2005 13:46:41 +0000
changeset 13 db0742533c10
parent 10 67c739ece5d5
child 16 f04e93b8af0f
permissions -rw-r--r--
Simple Send/Receive Funktionen.
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
     1
#----------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#  Makefile
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
#  IgH EtherCAT-Treiber
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
     7
#  $Id$
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
     9
#----------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
13
db0742533c10 Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    21
CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ \
db0742533c10 Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    22
	-DMODULE -I$(KERNELDIR)/include
6
e36a85dc2730 ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 5
diff changeset
    23
e36a85dc2730 ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 5
diff changeset
    24
ifdef CONFIG_SMP
e36a85dc2730 ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 5
diff changeset
    25
	CFLAGS += -D__SMP__ -DSMP
e36a85dc2730 ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 5
diff changeset
    26
endif
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
    28
MODULE = ecat_8139too.o
13
db0742533c10 Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    29
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
    30
	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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
    33
#----------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
13
db0742533c10 Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    35
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
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
doc docs:
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
	$(MAKE) -C .. doc
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
13
db0742533c10 Simple Send/Receive Funktionen.
Florian Pose <fp@igh-essen.com>
parents: 10
diff changeset
    53
.depend depend dep:
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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    55
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    56
clean:
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
	rm -f *.o *~ core .depend
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
#----------------------------------------------------------------