examples/test_copcican_linux/Makefile.in
changeset 629 b9274b595650
child 658 7758d60e9260
equal deleted inserted replaced
628:9e496a2aadca 629:b9274b595650
       
     1 #! gmake
       
     2 
       
     3 #
       
     4 # Copyright (C) 2010 Cosateq GmbH & Co.KG
       
     5 #               http://www.cosateq.com/
       
     6 #               http://www.scale-rt.com/
       
     7 #
       
     8 # This file is part of canfestival, a library implementing the canopen
       
     9 # stack
       
    10 #
       
    11 # This library is free software; you can redistribute it and/or
       
    12 # modify it under the terms of the GNU Lesser General Public
       
    13 # License as published by the Free Software Foundation; either
       
    14 # version 2.1 of the License, or (at your option) any later version.
       
    15 #
       
    16 # This library is distributed in the hope that it will be useful,
       
    17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    19 # Lesser General Public License for more details.
       
    20 #
       
    21 # You should have received a copy of the GNU Lesser General Public
       
    22 # License along with this library; if not, write to the Free Software
       
    23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    24 #
       
    25 
       
    26 CC = SUB_CC
       
    27 CXX = SUB_CXX
       
    28 LD = SUB_LD
       
    29 OPT_CFLAGS = -O2
       
    30 CFLAGS = SUB_OPT_CFLAGS
       
    31 PROG_CFLAGS = SUB_PROG_CFLAGS
       
    32 EXE_CFLAGS = SUB_EXE_CFLAGS
       
    33 OS_NAME = SUB_OS_NAME
       
    34 ARCH_NAME = SUB_ARCH_NAME
       
    35 PREFIX = SUB_PREFIX
       
    36 TARGET = SUB_TARGET
       
    37 CAN_DRIVER = SUB_CAN_DRIVER
       
    38 TIMERS_DRIVER = SUB_TIMERS_DRIVER
       
    39 
       
    40 INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER)
       
    41 
       
    42 TEST_COPCICAN_LINUX_OBJS = test_copcican_linux.o
       
    43 
       
    44 OBJS = $(TEST_COPCICAN_LINUX_OBJS) ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a ../../src/libcanfestival.a
       
    45 
       
    46 all: test_copcican_linux
       
    47 
       
    48 ../../src/libcanfestival.a:
       
    49 	$(MAKE) -C ../../src libcanfestival.a
       
    50 
       
    51 
       
    52 ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a:
       
    53 	$(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a
       
    54 
       
    55 
       
    56 test_copcican_linux: test_copcican_linux.c $(OBJS)
       
    57 	$(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
       
    58 
       
    59 %o: %c
       
    60 	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
       
    61 
       
    62 clean:
       
    63 	rm -f $(TEST_COPCICAN_LINUX_OBJS)
       
    64 	rm -f test_copcican_linux
       
    65 
       
    66 mrproper: clean
       
    67 	rm -f test_copcican_linux.c
       
    68 
       
    69 install: test_copcican_linux
       
    70 	mkdir -p $(PREFIX)/bin/
       
    71 	cp $< $(PREFIX)/bin/
       
    72 
       
    73 uninstall:
       
    74 	rm -f $(PREFIX)/bin/test_copcican_linux
       
    75 
       
    76