edouard@629: #! gmake edouard@629: edouard@629: # edouard@629: # Copyright (C) 2010 Cosateq GmbH & Co.KG edouard@629: # http://www.cosateq.com/ edouard@629: # http://www.scale-rt.com/ edouard@629: # edouard@629: # This file is part of canfestival, a library implementing the canopen edouard@629: # stack edouard@629: # edouard@629: # This library is free software; you can redistribute it and/or edouard@629: # modify it under the terms of the GNU Lesser General Public edouard@629: # License as published by the Free Software Foundation; either edouard@629: # version 2.1 of the License, or (at your option) any later version. edouard@629: # edouard@629: # This library is distributed in the hope that it will be useful, edouard@629: # but WITHOUT ANY WARRANTY; without even the implied warranty of edouard@629: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU edouard@629: # Lesser General Public License for more details. edouard@629: # edouard@629: # You should have received a copy of the GNU Lesser General Public edouard@629: # License along with this library; if not, write to the Free Software edouard@629: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA edouard@629: # edouard@629: edouard@629: CC = SUB_CC edouard@629: CXX = SUB_CXX edouard@629: LD = SUB_LD edouard@629: OPT_CFLAGS = -O2 edouard@629: CFLAGS = SUB_OPT_CFLAGS edouard@629: PROG_CFLAGS = SUB_PROG_CFLAGS edouard@629: EXE_CFLAGS = SUB_EXE_CFLAGS edouard@629: OS_NAME = SUB_OS_NAME edouard@629: ARCH_NAME = SUB_ARCH_NAME edouard@629: PREFIX = SUB_PREFIX edouard@629: TARGET = SUB_TARGET edouard@629: CAN_DRIVER = SUB_CAN_DRIVER edouard@629: TIMERS_DRIVER = SUB_TIMERS_DRIVER edouard@629: edouard@629: INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) edouard@629: edouard@629: TEST_COPCICAN_LINUX_OBJS = test_copcican_linux.o edouard@629: edouard@629: OBJS = $(TEST_COPCICAN_LINUX_OBJS) ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a ../../src/libcanfestival.a edouard@629: edouard@629: all: test_copcican_linux edouard@629: edouard@629: ../../src/libcanfestival.a: edouard@629: $(MAKE) -C ../../src libcanfestival.a edouard@629: edouard@629: edouard@629: ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a: edouard@629: $(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a edouard@629: edouard@629: edouard@629: test_copcican_linux: test_copcican_linux.c $(OBJS) edouard@629: $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) edouard@629: Christian@658: %.o: %.c edouard@629: $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< edouard@629: edouard@629: clean: edouard@629: rm -f $(TEST_COPCICAN_LINUX_OBJS) edouard@629: rm -f test_copcican_linux edouard@629: edouard@629: mrproper: clean edouard@629: rm -f test_copcican_linux.c edouard@629: edouard@629: install: test_copcican_linux s@790: mkdir -p $(DESTDIR)$(PREFIX)/bin/ s@790: cp $< $(DESTDIR)$(PREFIX)/bin/ edouard@629: edouard@629: uninstall: s@790: rm -f $(DESTDIR)$(PREFIX)/bin/test_copcican_linux edouard@629: edouard@629: