Makefile
author Florian Pose <fp@igh-essen.com>
Fri, 07 Apr 2006 08:29:19 +0000
changeset 168 8505cc1ad3ce
parent 167 37c65411b411
child 169 b3ecbec2c487
permissions -rw-r--r--
Better installer script
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
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
#  Globales 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
#
149
0ed43f09130f Keywords 2
Florian Pose <fp@igh-essen.com>
parents: 148
diff changeset
     7
#  $Id$
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
     9
#------------------------------------------------------------------------------
12
920e3b41a61f "make kerneldirs" erstellt die Default-Datei kerneldirs.mk zum Editieren.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    10
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    11
ifneq ($(KERNELRELEASE),)
16
f04e93b8af0f ?nderungen in den Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 12
diff changeset
    12
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    13
#------------------------------------------------------------------------------
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    14
# Kbuild-Abschnitt
12
920e3b41a61f "make kerneldirs" erstellt die Default-Datei kerneldirs.mk zum Editieren.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    15
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    16
obj-m := master/ devices/
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    17
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    18
#------------------------------------------------------------------------------
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    19
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    20
else
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    22
#------------------------------------------------------------------------------
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    23
# Default-Abschnitt
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    24
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    25
ifneq ($(wildcard ethercat.conf),)
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    26
include ethercat.conf
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    27
else
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    28
KERNELDIR := /usr/src/linux
167
37c65411b411 Added install script
Florian Pose <fp@igh-essen.com>
parents: 149
diff changeset
    29
INSTALLDIR := /opt/ethercat
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    30
endif
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    31
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    32
modules:
57
Florian Pose <fp@igh-essen.com>
parents: 54
diff changeset
    33
	$(MAKE) -C $(KERNELDIR) M=`pwd`
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    34
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    35
clean:
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    36
	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
167
37c65411b411 Added install script
Florian Pose <fp@igh-essen.com>
parents: 149
diff changeset
    38
install:
37c65411b411 Added install script
Florian Pose <fp@igh-essen.com>
parents: 149
diff changeset
    39
	@./install.sh $(INSTALLDIR)
37c65411b411 Added install script
Florian Pose <fp@igh-essen.com>
parents: 149
diff changeset
    40
73
9f4ea66d89a3 Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents: 71
diff changeset
    41
#------------------------------------------------------------------------------
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    42
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    43
endif