+#
# Makefile for the Linux CAN-bus driver.
# Written by Arnaud Westenberg email:arnaud@wanadoo.nl
# This software is released under the GPL-License.
#
########## The following options can be changed ##########
-# Compiler
-CC = gcc
-# Enable debugging messages
-DEBUG = y
+SUBDIRS = src utils
+
+ifneq ($(wildcard ./Standalone.mk),)
+# Standalone make outside of OCERA framework
all: default
default dep clean install:
$(foreach dir, $(dirs), $(MAKE) -C $(dir) $@ ; )
+
+else
+# Build in structure of OCERA framework
+
+TOPDIR = $(LINUX_DIR)
+
+ifneq ($(wildcard ../../../../ocera.mk),)
+include ../../../../ocera.mk
+else
+all:
+ @echo -e "\nTo build LinCAN driver for OCERA framework, ocera.mk file have"
+ @echo -e "to be generated first. Go to ocera/ directory and do 'make', please."
+ @echo -e "If standalone build is required, mark lincan/ by 'touch ./Standalone.mk'.\n"
+endif
+endif
+