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