X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/47002b02942d3d48e4e24ef91fc55177cdcda486..2827b727d2910a3b48f9de7d67b3a67f59e256c7:/lincan/Makefile diff --git a/lincan/Makefile b/lincan/Makefile index 8978872..f595272 100644 --- a/lincan/Makefile +++ b/lincan/Makefile @@ -1,22 +1,14 @@ -# -# Makefile for the Linux CAN-bus driver. -# Written by Arnaud Westenberg email:arnaud@wanadoo.nl -# This software is released under the GPL-License. -# Version 0.7 6 Aug 2001 -# -# Changes made by Pavel Pisa pisa@cmp.felk.cvut.cz as preliminary -# study for OCERA Real Time CAN/CANOpen project ORTCAN -# -########## The following options can be changed ########## +# Generic directory or leaf node makefile for OCERA make framework -TOPDIR = $(LINUX_DIR) - -SUBDIRS = src utils +ifndef MAKERULES_DIR +MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) ) +endif -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." +ifeq ($(MAKERULES_DIR),) +all : default +.DEFAULT:: + @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n" +else +include $(MAKERULES_DIR)/Makefile.rules endif