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