drivers/can_anagate_linux/Makefile.in
author fbeaulier
Tue, 16 Aug 2011 14:15:52 +0200
changeset 663 70fc3603e36f
parent 658 7758d60e9260
child 790 1936110171a2
permissions -rw-r--r--
timers_unix.c : remove sigint and sigterm catch
sdo : Allow multiple servers
The sdo transfer struct is not anymore referenced by server's node id but by
client or server number in the OD. Node id is not relevant in SDO transfert.
494
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     1
#! gmake
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     2
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     3
#
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     4
# Copyright (C) 2006 Laurent Bessard
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     5
# 
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     6
# This file is part of canfestival, a library implementing the canopen
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     7
# stack
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     8
# 
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
     9
# This library is free software; you can redistribute it and/or
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    10
# modify it under the terms of the GNU Lesser General Public
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    11
# License as published by the Free Software Foundation; either
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    12
# version 2.1 of the License, or (at your option) any later version.
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    13
# 
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    14
# This library is distributed in the hope that it will be useful,
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    17
# Lesser General Public License for more details.
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    18
# 
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    19
# You should have received a copy of the GNU Lesser General Public
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    20
# License along with this library; if not, write to the Free Software
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    21
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    22
# 
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    23
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    24
CC = SUB_CC
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    25
OPT_CFLAGS = -O2
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    26
CFLAGS = SUB_OPT_CFLAGS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    27
PROG_CFLAGS = SUB_PROG_CFLAGS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    28
PREFIX = SUB_PREFIX
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    29
TARGET = SUB_TARGET
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    30
CAN_DRIVER = SUB_CAN_DRIVER
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    31
TIMERS_DRIVER = SUB_TIMERS_DRIVER
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    32
ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    33
CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    34
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    35
INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    36
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    37
OBJS = $(CAN_DRIVER).o
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    38
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    39
ifeq ($(ENABLE_DLL_DRIVERS),1)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    40
CFLAGS += -fPIC
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    41
DRIVER = libcanfestival_$(CAN_DRIVER).so
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    42
else
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    43
DRIVER = $(OBJS)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    44
endif
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    45
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    46
TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    47
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    48
all: driver
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    49
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    50
driver: $(DRIVER)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    51
658
7758d60e9260 FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents: 502
diff changeset
    52
%.o: %.c
494
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    53
	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    54
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    55
libcanfestival_$(CAN_DRIVER).so: $(OBJS)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    56
	$(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $<
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    57
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    58
install: libcanfestival_$(CAN_DRIVER).so
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    59
	mkdir -p $(PREFIX)/lib/
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    60
	cp $< $(PREFIX)/lib/
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    61
		
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    62
uninstall:
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    63
	rm -f $(TARGET_SOFILES)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    64
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    65
clean:
502
e06afbb9adcd Added removal of dynamically loaded CAN driver interface library in clean make target
etisserant
parents: 494
diff changeset
    66
	rm -f $(OBJS) libcanfestival_$(CAN_DRIVER).so
494
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    67
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    68
mrproper: clean