###################################################################### ## ## Copyright (C) 1999-2010, Karlsruhe University ## Copyright (C) 2008-2009, Volkmar Uhlig, IBM Corporation ## ## File path: src/api/v4/Makeconf ## Description: ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: ## 1. Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. ## 2. Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in the ## documentation and/or other materials provided with the distribution. ## ## THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ## ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## ## $Id$ ## ###################################################################### SOURCES += $(addprefix src/api/v4/, exregs.cc ipc.cc ipcx.cc kernelinterface.cc thread.cc schedule.cc space.cc interrupt.cc smp.cc processor.cc) SOURCES += $(addprefix src/api/v4/sched-$(SCHED)/, schedule.cc) ifeq ("$(CONFIG_X_CTRLXFER_MSG)","y") SOURCES+= src/glue/$(API)-$(ARCH)/ipc.cc endif VERSIONFILE=$(BUILDDIR)/.version $(VERSIONFILE): phony @if [ ! -f $(VERSIONFILE) ]; \ then echo 1 > $(VERSIONFILE); \ else expr `cat $(VERSIONFILE)` + 1 > $(VERSIONFILE); \ fi src/api/v4/kernelinterface.o: include/version.h include/version.h: $(VERSIONFILE) @$(ECHO_MSG) $@ @$(PRINTF) '\ // \n\ // Autmatically generated. Do not edit. \n\ // \n\ \n' > $@ @VERSION=`grep AC_INIT $(SRCDIR)/../user/configure.in | \ sed 's/[^0-9.]*\([0-9.]*\)[^0-9.]*/\1/'` ;\ $(PRINTF) '\ #define KERNEL_VERSION %d \n\ #define KERNEL_SUBVERSION %d \n\ #define KERNEL_SUBSUBVERSION %d \n\n' \ `echo $$VERSION | cut -d. -f1` \ `echo $$VERSION | cut -d. -f2` \ `echo $$VERSION | cut -d. -f3` >> $@ @$(PRINTF) '\ #define KERNELGENDATE SHUFFLE3(%s) \n\ #define __USER__ "%s" \n\ #define __KERNELBUILDNO__ %d \n\n' \ `date "+day:(1%d-100),month:(1%m-100),year:(%Y-2000)"` \ $(USER)@`hostname` \ `cat $(VERSIONFILE)` >> $@