drivers/can_tcp_win32/Makefile.in
author Edouard Tisserant
Thu, 23 Jun 2011 18:12:34 +0200
changeset 662 aad111ad0018
parent 658 7758d60e9260
child 768 defc987225a1
permissions -rwxr-xr-x
fixed bug with cross wmingw build
355
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     1
#! gmake
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     2
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     3
#
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     4
# Copyright (C) 2006 Edouard TISSERANT
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     5
# 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     6
# This file is part of canfestival, a library implementing the canopen
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     7
# stack
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     8
# 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     9
# This library is free software; you can redistribute it and/or
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    10
# modify it under the terms of the GNU Lesser General Public
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    11
# License as published by the Free Software Foundation; either
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    12
# version 2.1 of the License, or (at your option) any later version.
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    13
# 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    14
# This library is distributed in the hope that it will be useful,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    17
# Lesser General Public License for more details.
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    18
# 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    19
# You should have received a copy of the GNU Lesser General Public
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    20
# License along with this library; if not, write to the Free Software
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    21
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    22
# 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    23
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    24
CC = SUB_CC
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    25
CXX = SUB_CXX
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    26
LD = SUB_LD
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    27
OPT_CFLAGS = -O2
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    28
CFLAGS = SUB_OPT_CFLAGS
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    29
PROG_CFLAGS = SUB_PROG_CFLAGS
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    30
PREFIX = SUB_PREFIX
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    31
TARGET = SUB_TARGET
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    32
CAN_DRIVER = SUB_CAN_DRIVER
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    33
TIMERS_DRIVER = SUB_TIMERS_DRIVER
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    34
ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    35
CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    36
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    37
INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    38
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    39
OBJS =  Socket.o $(CAN_DRIVER).o
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    40
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    41
ifeq ($(ENABLE_DLL_DRIVERS),1)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    42
#CFLAGS += -fPIC
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    43
DRIVER = cyg$(CAN_DRIVER).dll
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    44
else
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    45
DRIVER = $(OBJS)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    46
endif
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    47
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    48
SERVER = $(CAN_DRIVER)_server
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    49
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    50
TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    51
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    52
all: driver
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    53
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    54
driver: $(DRIVER) $(SERVER).exe
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    55
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    56
$(SERVER).exe: Socket.o $(SERVER).cpp
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    57
	$(CXX) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) $^ -o $@ -lws2_32
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    58
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    59
Socket.o: Socket.cpp Socket.h
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    60
	$(CXX) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -c $< -o $@
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    61
658
7758d60e9260 FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents: 377
diff changeset
    62
%.o: %.c
355
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    63
	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    64
658
7758d60e9260 FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents: 377
diff changeset
    65
%.o: %.cpp
355
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    66
	$(CXX) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    67
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    68
$(DRIVER): $(OBJS)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    69
	$(LD) $(PROG_CFLAGS) -shared -o $@ \
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    70
	-Wl,--export-all-symbols \
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    71
	-Wl,--enable-auto-import \
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    72
	-Wl,--whole-archive $^ \
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    73
	-Wl,--no-whole-archive $(CAN_DLL_CFLAGS) \
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    74
	-Wl,--exclude-libs,ALL -lws2_32
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    75
		
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    76
install: libcanfestival_$(CAN_DRIVER).so
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    77
	mkdir -p $(PREFIX)/lib/
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    78
	cp $< $(PREFIX)/lib/
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    79
		
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    80
uninstall:
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    81
	rm -f $(TARGET_SOFILES)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    82
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    83
clean:
377
bea5a1576cbd Enhanced cleanup of TCP CAN client/server
etisserant
parents: 355
diff changeset
    84
	rm -f $(OBJS) $(DRIVER) $(SERVER).exe
355
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    85
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    86
mrproper: clean