]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/Makefile
Added missing spin-lock initialization and minor Makefiles update.
[lincan.git] / lincan / Makefile
index 87f2000ad8468a0b0ff1449c34f2294ba7b53e98..d64354563d43ba4a44109f118b605d533e4119b0 100644 (file)
@@ -9,37 +9,33 @@
 #
 ########## The following options can be changed ##########
 
 #
 ########## The following options can be changed ##########
 
+SUBDIRS = src utils
 
 
-ifneq ($(wildcard ./Standalone.mk),)
-# Standalone make outside of OCERA framework
+ifndef SOURCES_DIR
+SOURCES_DIR := $(shell ( pwd -L ) )
+endif
 
 
-SUBDIRS = src utils
+ifneq ($(wildcard $(SOURCES_DIR)/Standalone.mk),)
+# Standalone make outside of OCERA framework
 
 all: default
 
 .PHONY: dep default subdirs clean cleandepend
 
 all: default
 
 .PHONY: dep default subdirs clean cleandepend
+.PHONY: check-dir include-pass library-pass binary-pass utils-pass kernel-lib-pass kernel-pass
 
 dirs = src utils
 
 
 dirs = src utils
 
-default dep clean install:
-       $(foreach dir, $(dirs), $(MAKE) -C $(dir) $@ ; )
+default dep clean install utils-pass kernel-pass:
+       $(foreach dir, $(dirs), $(MAKE) -C $(SOURCES_DIR)/$(dir) \
+           SOURCES_DIR=$(SOURCES_DIR)/$(dir) $@ ; )
 
 else
 # Build in structure of OCERA framework
 
 TOPDIR = $(LINUX_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
 
 ifneq ($(wildcard ../../../../ocera.mk),)
 include ../../../../ocera.mk
-
-dirs = src utils
-
-default dep clean install:
-       $(foreach dir, $(dirs), $(MAKE) -C $(dir) $@ ; )
-
 else
 all: 
        @echo -e "\nTo build LinCAN driver for OCERA framework, ocera.mk file have"
 else
 all: 
        @echo -e "\nTo build LinCAN driver for OCERA framework, ocera.mk file have"