drivers/can_anagate_win32/Makefile.in
author Edouard Tisserant
Mon, 23 Apr 2018 12:32:03 +0200
changeset 805 570e3a444023
parent 790 1936110171a2
permissions -rw-r--r--
Workaround Alchemy task not beeing waken up when closing file descriptor it is waiting on, sequel of Xenomai3 all posix file ops
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
770
4e29238f514c Restored 'libcanfestival_' prefix to windows CAN drivers DLLs
Edouard Tisserant
parents: 768
diff changeset
    43
DRIVER = libcanfestival_$(CAN_DRIVER).dll
494
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
790
1936110171a2 Honor DESTDIR in install rules
Samuel Martin <s.martin49@gmail.com>
parents: 770
diff changeset
    49
TARGET_SOFILES = $(DESTDIR)$(PREFIX)/lib/$(DRIVER)
494
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
658
7758d60e9260 FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents: 494
diff changeset
    56
%.o: %.c
494
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
658
7758d60e9260 FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents: 494
diff changeset
    59
%.o: %.cpp
494
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
790
1936110171a2 Honor DESTDIR in install rules
Samuel Martin <s.martin49@gmail.com>
parents: 770
diff changeset
    72
	mkdir -p $(DESTDIR)$(PREFIX)/lib/
1936110171a2 Honor DESTDIR in install rules
Samuel Martin <s.martin49@gmail.com>
parents: 770
diff changeset
    73
	cp $< $(DESTDIR)$(PREFIX)/lib/
494
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