drivers/can_copcican_linux/Makefile.in
author Mongo
Thu, 13 Oct 2011 17:51:27 +0200
changeset 669 50da44ebaf00
parent 658 7758d60e9260
child 790 1936110171a2
permissions -rw-r--r--
Configuration manager with DCF in object 0x1F22 rewritten almost from scratch.
1. The boot-up message from a device starts a verification of entries
2. If all entries matches the node is started
3. If an entry differs the whole dcf is written and a save is done
4. A reset is send to the node
5. If several boot-up are received at the same time they will be managed one
by one thus only one free sdo client is needed for the whole process.
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     1
#! gmake
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     2
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     3
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     4
# Copyright (C) 2010 Cosateq GmbH & Co.KG
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     5
#               http://www.cosateq.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     6
#               http://www.scale-rt.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     7
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     8
# This file is part of canfestival, a library implementing the canopen
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     9
# stack
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    10
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    11
# This library is free software; you can redistribute it and/or
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    12
# modify it under the terms of the GNU Lesser General Public
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    13
# License as published by the Free Software Foundation; either
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    14
# version 2.1 of the License, or (at your option) any later version.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    15
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    16
# This library is distributed in the hope that it will be useful,
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    19
# Lesser General Public License for more details.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    20
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    21
# You should have received a copy of the GNU Lesser General Public
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    22
# License along with this library; if not, write to the Free Software
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    23
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    24
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    25
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    26
CC = SUB_CC
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    27
OPT_CFLAGS = -O2
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    28
CFLAGS = SUB_OPT_CFLAGS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    29
PROG_CFLAGS = SUB_PROG_CFLAGS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    30
PREFIX = SUB_PREFIX
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    31
TARGET = SUB_TARGET
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    32
CAN_DRIVER = SUB_CAN_DRIVER
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    33
TIMERS_DRIVER = SUB_TIMERS_DRIVER
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    34
ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    35
CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    36
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    37
INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    38
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    39
OBJS = $(CAN_DRIVER).o
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    40
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    41
ifeq ($(ENABLE_DLL_DRIVERS),1)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    42
CFLAGS += -fPIC
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    43
DRIVER = libcanfestival_$(CAN_DRIVER).so
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    44
else
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    45
DRIVER = $(OBJS)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    46
endif
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    47
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    48
TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    49
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    50
all: driver
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    51
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    52
driver: $(DRIVER)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    53
658
7758d60e9260 FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents: 629
diff changeset
    54
%.o: %.c
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    55
	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    56
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    57
libcanfestival_$(CAN_DRIVER).so: $(OBJS)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    58
	$(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $<
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    59
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    60
install: libcanfestival_$(CAN_DRIVER).so
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    61
	mkdir -p $(PREFIX)/lib/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    62
	cp $< $(PREFIX)/lib/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    63
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    64
uninstall:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    65
	rm -f $(TARGET_SOFILES)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    66
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    67
clean:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    68
	rm -f $(OBJS)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    69
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    70
mrproper: clean