# Copyright (C) OCERA Consortium. # Author Miguel Masmano ######################## Variables to customise. # Name of the component COMPONENT=rtlterminal # Directory where the kernels are located KERNELS= RTLINUX=$(KERNELS) .PHONY : kernelset # XSTLSTYLE=../../../component.xslt install: kernelset $(RTLINUX) install_src install_examples @if test -f $(PWD)/patches/rtlinux-3.2pre1_rtlterminal_1.0.patch ; then \ cd $(RTLINUX); patch -p1 < $(PWD)/patches/rtlinux-3.2pre1_rtlterminal_1.0.patch; \ fi install_src: @echo "Copying " $(COMPONENT) " sources" @if [ \! -d $(RTLINUX)/drivers/$(COMPONENT) ] ; then mkdir $(RTLINUX)/drivers/$(COMPONENT); fi @cp -fr src/* $(RTLINUX)/drivers/$(COMPONENT) @echo "Copying $(COMPONENT) includes" @cp -fr include/* $(RTLINUX)/include/ install_examples: @echo "Copying " $(COMPONENT) " examples" @if [ \! -d $(RTLINUX)/examples/$(COMPONENT) ] ; then mkdir $(RTLINUX)/examples/$(COMPONENT); fi @cp -fr examples/* $(RTLINUX)/examples/$(COMPONENT) kernelset: @if [ -n "$(RTLINUX)" -o ! -d "$(RTLINUX)" ] ; then \ echo "";\ echo "KERNELS Makefile variable not set." ; \ echo "It must point to the directory where RTLinux code is located.";\ echo "Please, edit the Makefile and set KERNELS variable.";\ echo "";\ exit 1;\ fi clean: find . \( -name '*~' -o -name '*.o' -o -name core \) -exec /bin/rm -r '{}' \;