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