drivers/can_anagate_win32/Makefile.in
author Christian Taedcke <Christian.Taedcke@ica-traffic.de>
Fri, 19 Feb 2010 08:18:40 +0100
changeset 639 27c0a025acf3
parent 494 aa36efce6e78
child 658 7758d60e9260
permissions -rw-r--r--
CHANGED: - if variable starts with a digit, add a "_" at the beginning
* * *
FIXED: - if callback array name starts with a digit, prepend "_"
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 Edouard TISSERANT
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
CXX = SUB_CXX
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    26
LD = SUB_LD
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    27
OPT_CFLAGS = -O2
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    28
CFLAGS = SUB_OPT_CFLAGS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    29
PROG_CFLAGS = SUB_PROG_CFLAGS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    30
PREFIX = SUB_PREFIX
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    31
TARGET = SUB_TARGET
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    32
CAN_DRIVER = SUB_CAN_DRIVER
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    33
TIMERS_DRIVER = SUB_TIMERS_DRIVER
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    34
ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    35
CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    36
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    37
INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -IAnaGateCAN_API
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    38
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    39
OBJS =  $(CAN_DRIVER).o
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    40
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    41
ifeq ($(ENABLE_DLL_DRIVERS),1)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    42
#CFLAGS += -fPIC
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    43
DRIVER = cyg$(CAN_DRIVER).dll
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    44
else
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    45
DRIVER = $(OBJS)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    46
endif
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    47
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    48
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    49
TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    50
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    51
all: driver
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    52
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    53
driver: $(DRIVER)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    54
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    55
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    56
%o: %c
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    57
	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    58
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    59
%o: %cpp
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    60
	$(CXX) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    61
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    62
$(DRIVER): $(OBJS)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    63
	$(LD) $(PROG_CFLAGS) -shared -o $@ \
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    64
	-Wl,--export-all-symbols \
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    65
	-Wl,--enable-auto-import \
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    66
	-Wl,--whole-archive $^ \
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    67
	-Wl,--no-whole-archive $(CAN_DLL_CFLAGS) \
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    68
        AnaGateCAN_API/AnaGateCANDll.lib \
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    69
	-Wl,--exclude-libs,ALL -lws2_32
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    70
		
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    71
install: libcanfestival_$(CAN_DRIVER).so
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    72
	mkdir -p $(PREFIX)/lib/
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    73
	cp $< $(PREFIX)/lib/
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    74
		
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    75
uninstall:
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    76
	rm -f $(TARGET_SOFILES)
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    77
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    78
clean:
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    79
	rm -f $(OBJS) $(DRIVER) $(SERVER).exe
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    80
aa36efce6e78 add anagate device support in CanFestival
greg
parents:
diff changeset
    81
mrproper: clean