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