examples/test_copcican_linux/Makefile.in
author fojtik <>
Sat, 20 Oct 2012 10:17:29 +0200
changeset 760 71623bbf8093
parent 658 7758d60e9260
child 790 1936110171a2
permissions -rw-r--r--
Fixed compilability with Micrsoft visual C++
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
CXX = SUB_CXX
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    28
LD = SUB_LD
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    29
OPT_CFLAGS = -O2
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    30
CFLAGS = SUB_OPT_CFLAGS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    31
PROG_CFLAGS = SUB_PROG_CFLAGS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    32
EXE_CFLAGS = SUB_EXE_CFLAGS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    33
OS_NAME = SUB_OS_NAME
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    34
ARCH_NAME = SUB_ARCH_NAME
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    35
PREFIX = SUB_PREFIX
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    36
TARGET = SUB_TARGET
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    37
CAN_DRIVER = SUB_CAN_DRIVER
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    38
TIMERS_DRIVER = SUB_TIMERS_DRIVER
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    39
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    40
INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    41
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    42
TEST_COPCICAN_LINUX_OBJS = test_copcican_linux.o
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    43
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    44
OBJS = $(TEST_COPCICAN_LINUX_OBJS) ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a ../../src/libcanfestival.a
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    45
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    46
all: test_copcican_linux
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    47
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    48
../../src/libcanfestival.a:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    49
	$(MAKE) -C ../../src libcanfestival.a
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    50
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    51
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    52
../../drivers/$(TARGET)/libcanfestival_$(TARGET).a:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    53
	$(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    54
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    55
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    56
test_copcican_linux: test_copcican_linux.c $(OBJS)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    57
	$(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    58
658
7758d60e9260 FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents: 629
diff changeset
    59
%.o: %.c
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    60
	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    61
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    62
clean:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    63
	rm -f $(TEST_COPCICAN_LINUX_OBJS)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    64
	rm -f test_copcican_linux
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    65
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    66
mrproper: clean
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    67
	rm -f test_copcican_linux.c
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    68
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    69
install: test_copcican_linux
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    70
	mkdir -p $(PREFIX)/bin/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    71
	cp $< $(PREFIX)/bin/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    72
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    73
uninstall:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    74
	rm -f $(PREFIX)/bin/test_copcican_linux
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    75
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    76