# /**(c)
# 
#   Copyright (C) 2006-2012 Christian Wawersich, Michael Stilkerich, Christoph Erhardt
# 
#   This file is part of the KESO Java Runtime Environment.
# 
#   KESO is free software: you can redistribute it and/or modify it under the
#   terms of the Lesser GNU General Public License as published by the Free
#   Software Foundation, either version 3 of the License, or (at your option)
#   any later version.
# 
#   KESO is distributed in the hope that it will be useful, but WITHOUT ANY
#   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
#   FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
#   more details. You should have received a copy of the GNU Lesser General
#   Public License along with KESO. If not, see <http://www.gnu.org/licenses/>.
# 
#   Please contact keso@cs.fau.de for more info.
# 
#   (c)**/

.PHONY: clean all distclean

SRC=$(wildcard ../../*.c)
DEPS=$(SRC:%.c=%.dep)
OBJSBASE=$(SRC:../../%.c=%.o)
VPATH=../..

all: libKESO-$(ARCH).a

libKESO-$(ARCH).a: $(OBJSBASE) ../../arch/$(ARCH)/linux-osek-mapper.o
	ar r libKESO-$(ARCH).a $(OBJSBASE) ../../arch/$(ARCH)/linux-osek-mapper.o ../../arch/$(ARCH)/libos/*.o

clean:
	rm -f $(OBJSBASE)

distclean: clean
	rm -f libKESO-$(ARCH).a

.c.o:
	$(CC) $(CFLAGS) -c -o $(shell basename $@) $<

-include $(DEPS)

