drivers/Makefile
author Florian Pose <fp@igh-essen.com>
Tue, 12 Jan 2010 23:40:37 +0100
branchkernel-2.4
changeset 1766 9e4d4306b641
parent 16 f04e93b8af0f
child 22 e8c2cd004e0b
permissions -rw-r--r--
Closed branch.
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
16
f04e93b8af0f ?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 13
diff changeset
    11
CONFIG_FILE = ../ethercat.conf
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
    35
#----------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
doc docs:
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
	$(MAKE) -C .. doc
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
clean:
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    59
	rm -f *.o *~ core .depend
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    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
#----------------------------------------------------------------