X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/786c7d54e8d820e89997e507c29ea716c0d55fd9..c6d6f58c34e1b6a4c03d1e86d1abf48eeb6f5624:/lincan/Makefile diff --git a/lincan/Makefile b/lincan/Makefile index 28722b9..87f2000 100644 --- a/lincan/Makefile +++ b/lincan/Makefile @@ -1,3 +1,4 @@ +# # Makefile for the Linux CAN-bus driver. # Written by Arnaud Westenberg email:arnaud@wanadoo.nl # This software is released under the GPL-License. @@ -8,10 +9,11 @@ # ########## The following options can be changed ########## -# Compiler -CC = gcc -# Enable debugging messages -DEBUG = y + +ifneq ($(wildcard ./Standalone.mk),) +# Standalone make outside of OCERA framework + +SUBDIRS = src utils all: default @@ -21,3 +23,28 @@ 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 "\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 +