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