devices/ccat/Kbuild.in
author Florian Pose <fp@igh-essen.com>
Fri, 25 Apr 2014 16:42:36 +0200
branchstable-1.5
changeset 2556 674fcdccc0f3
parent 2553 b0c2762a1a83
child 2557 ded6d50de4a7
permissions -rw-r--r--
merge
2549
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     1
#------------------------------------------------------------------------------
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     2
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     3
#  $Id$
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     4
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     5
#  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     6
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     7
#  This file is part of the IgH EtherCAT Master.
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     8
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
     9
#  The IgH EtherCAT Master is free software; you can redistribute it and/or
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    10
#  modify it under the terms of the GNU General Public License version 2, as
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    11
#  published by the Free Software Foundation.
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    12
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    13
#  The IgH EtherCAT Master is distributed in the hope that it will be useful,
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    14
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    15
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    16
#  Public License for more details.
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    17
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    18
#  You should have received a copy of the GNU General Public License along
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    19
#  with the IgH EtherCAT Master; if not, write to the Free Software
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    20
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    21
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    22
#  ---
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    23
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    24
#  The license mentioned above concerns the source code only. Using the
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    25
#  EtherCAT technology and brand is only permitted in compliance with the
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    26
#  industrial property and similar rights of Beckhoff Automation GmbH.
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    27
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    28
#  ---
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    29
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    30
#  vim: syntax=make
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    31
#
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    32
#------------------------------------------------------------------------------
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    33
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    34
TOPDIR := $(src)/../..
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    35
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    36
REV := $(shell if test -s $(TOPDIR)/revision; then \
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    37
		cat $(TOPDIR)/revision; \
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    38
	else \
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    39
		hg id -i $(TOPDIR) 2>/dev/null || echo "unknown"; \
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    40
	fi)
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    41
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    42
ifeq (@ENABLE_CCAT@,1)
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    43
	EC_CCAT_OBJ := \
2553
b0c2762a1a83 ccat: use the same file for different driver version
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2549
diff changeset
    44
		module.o \
b0c2762a1a83 ccat: use the same file for different driver version
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2549
diff changeset
    45
		netdev.o \
b0c2762a1a83 ccat: use the same file for different driver version
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2549
diff changeset
    46
		print.o \
b0c2762a1a83 ccat: use the same file for different driver version
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2549
diff changeset
    47
		update.o
2549
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    48
	obj-m += ec_ccat.o
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    49
	ec_ccat-objs := $(EC_CCAT_OBJ)
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    50
	CFLAGS_ccat_main-@KERNEL_CCAT@-ethercat.o = -DREV=$(REV)
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    51
endif
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    52
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    53
KBUILD_EXTRA_SYMBOLS := \
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    54
	@abs_top_builddir@/$(LINUX_SYMVERS) \
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    55
	@abs_top_builddir@/master/$(LINUX_SYMVERS)
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    56
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents:
diff changeset
    57
#------------------------------------------------------------------------------