# Copyright (C) OCERA Consortium. # Author: Pau Mendoza & Josep Vidal & Ismael Ripoll & Sergio Saez # Component: POSIX Message Queue ######################## Variables to customise. # Name of the component COMPONENT=CMP_PMQUEUE COMPONENT_NAME=pmqueue ifneq ($(wildcard ../../../ocera.mk),) include ../../../ocera.mk else all: @echo -e "You should go to the ocera/ directory and do 'make' to generate the ocera.mk file first.\nThanks." endif all: install install: kernelset install_src install_examples doc kernelset: @if [ ! -d $(RTLINUX_DIR) ] ; then \ echo "";\ echo "You should go to the ocera/ dir and do 'make'" ; \ echo "";\ fi @if test ! -d $(PWD)/src ; then \ echo "";\ echo "Error: source directory not found." ; \ Error;\ fi; @if test ! -d $(PWD)/include ; then \ echo "";\ echo "Error: include directory not found." ; \ Error;\ fi; @if test ! -d $(LINUX_DIR) ; then \ echo "";\ echo "LINUX Makefile variable not set." ; \ echo "It must point to the directory where Linux code is located.";\ echo "Please, edit the Makefile and set LINUX variable.";\ echo "";\ Error;\ fi; @if test ! -r $(PWD)/patches/rtlinux-3.2pre1_pmqueue.patch; then \ echo "pmqueue patch file not found";\ Error;\ fi install_examples: kernelset @echo "Coping examples & tests" @cp -fr examples/* $(RTLINUX_DIR)/examples/ doc: @echo "Installing pdf..." docbook2pdf $(PWD)/doc/$(COMPONENT_NAME)-info.xml mv $(PWD)/doc/$(COMPONENT_NAME)-info.pdf $(RTLINUX_DIR)/doc/$(COMPONENT_NAME)/ clean: kernelset rm -f *~ *.bak install_src: @if test -r $(PWD)/patches/rtlinux-3.2pre1_pmqueue.patch;\ then \ grep CONFIG_OC_PMQUEUE $(RTLINUX_DIR)/scripts/config.in > /dev/null || \ (echo "Patching RT-Linux"; \ cd $(RTLINUX_DIR);\ patch -p1 < $(PWD)/patches/rtlinux-3.2pre1_pmqueue.patch;\ cd -; \ echo "Coping source to RT-Linux directory"; \ cp -fr src/* $(RTLINUX_DIR)/mqueue/ ; \ echo "Coping includes to RT-Linux directory"; \ cp -fr include/* $(RTLINUX_DIR)/include/ );\ else \ echo "Patches not found"; \ Error;\ fi