]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/Makefile
Added support for fasync system call and replacement of spinXXX by can_spinXXX
[lincan.git] / lincan / Makefile
index 8978872505887a53fbcd92a003ce64b84451d31b..87f2000ad8468a0b0ff1449c34f2294ba7b53e98 100644 (file)
@@ -9,14 +9,42 @@
 #
 ########## The following options can be changed ##########
 
-TOPDIR = $(LINUX_DIR)
+
+ifneq ($(wildcard ./Standalone.mk),)
+# Standalone make outside of OCERA framework
 
 SUBDIRS = src utils
 
+all: default
+
+.PHONY: dep default subdirs clean cleandepend
+
+dirs = src utils
+
+default dep clean install:
+       $(foreach dir, $(dirs), $(MAKE) -C $(dir) $@ ; )
+
+else
+# Build in structure of OCERA framework
+
+TOPDIR = $(LINUX_DIR)
+COMPONENT = CONFIG_OC_LINCAN
+COMPONENT_NAME = lincan
+COMPONENT_TARGETS = default
+
 ifneq ($(wildcard ../../../../ocera.mk),)
 include ../../../../ocera.mk
+
+dirs = src utils
+
+default dep clean install:
+       $(foreach dir, $(dirs), $(MAKE) -C $(dir) $@ ; )
+
 else
 all: 
-       @echo -e "You should go to the ocera/ directory and do 'make' to generate the ocera.mk file first.\nThanks."
+       @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