X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/2643ffe04b05bb09eaedbb594191063610a540f6..47652e8d16ce55b49ea5435b1216b002cbc366a9:/lincan/Makefile diff --git a/lincan/Makefile b/lincan/Makefile index 87f2000..d643545 100644 --- a/lincan/Makefile +++ b/lincan/Makefile @@ -9,37 +9,33 @@ # ########## 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 +.PHONY: check-dir include-pass library-pass binary-pass utils-pass kernel-lib-pass kernel-pass 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) -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 "\nTo build LinCAN driver for OCERA framework, ocera.mk file have"