Included in linux kernel tree hrt, gensched and rtlinux patches.
Included in rtlinux tree dynmem,psignals,ptimers,ptrace,pmqueue,pbarriers
and rtlcbs patches
Many fixes to the linux kernel build process.
Many fixes to the rtlinux module build process.
Even more fixes to the makefiles and tree structure of the components tree.
This is the first step on integration path, please, report standing problems.
# Makefile for the Linux CAN-bus driver.
# Written by Arnaud Westenberg email:arnaud@wanadoo.nl
# This software is released under the GPL-License.
# 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 ##########
#
########## The following options can be changed ##########
-# Compiler
-CC = gcc
-# Enable debugging messages
-DEBUG = y
-
-all: default
-.PHONY: dep default subdirs clean cleandepend
+ifneq ($(wildcard ../../../../ocera.mk),)
+include ../../../../ocera.mk
+else
+all:
+ @echo -e "You should go to the ocera/ directory and do 'make' to generate the ocera.mk file first.\nThanks."
+endif
-default dep clean install:
- $(foreach dir, $(dirs), $(MAKE) -C $(dir) $@ ; )
#
#*****************************************************************
#
#*****************************************************************
+ifdef SUBDIRS
+SUBDIRS =
+endif
+
+ifneq ($(wildcard ../../../../../ocera.mk),)
+ifndef TOPDIR
+include ../../../../../ocera.mk
+else
+LINUX_DIR = ../../../../../kernel/linux/
+endif
+else
+OCERA_NOTDEF = 1
+all:
+ @echo -e "You should go to the ocera/ directory and do 'make' to generate the ocera.mk file first.\nThanks."
+endif
+
# Where to look for kernel
# if not defined, sources of current running kernel are found
#KERNEL_LOCATION=/usr/src/linux
# Where to look for kernel
# if not defined, sources of current running kernel are found
#KERNEL_LOCATION=/usr/src/linux
#KERNEL_LOCATION=/usr/src/linux-2.6.0-test4
#KERNEL_LOCATION=/home/cvs/ocera/ocera-build/kernel/linux
#KERNEL_LOCATION=/usr/src/linux-2.6.0-test4
#KERNEL_LOCATION=/home/cvs/ocera/ocera-build/kernel/linux
+ifdef LINUX_DIR
+KERNEL_LOCATION = $(LINUX_DIR)
+endif
+
# Enable debugging messages
#DEBUG = y
# Enable debugging messages
#DEBUG = y
+TOPDIR = $(KERNEL_LOCATION)
+CONFIG_SHELL = TOPDIR=$(TOPDIR)
+
KERNEL_VERSION := $(shell awk -F\" '/REL/ {print $$2}' \
$(KERNEL_LOCATION)/include/linux/version.h | awk -F\- '{print $$1}')
KERNEL_VERSION := $(shell awk -F\" '/REL/ {print $$2}' \
$(KERNEL_LOCATION)/include/linux/version.h | awk -F\- '{print $$1}')
O_OBJS += $(SUPPORTED_CARDS:%=%.o)
O_OBJS += can_queue.o devcommon.o main.o modparms.o setup.o \
sja1000p.o sja1000.o i82527.o irq.o boardlist.o \
O_OBJS += $(SUPPORTED_CARDS:%=%.o)
O_OBJS += can_queue.o devcommon.o main.o modparms.o setup.o \
sja1000p.o sja1000.o i82527.o irq.o boardlist.o \
- open.o close.o write.o read.o ioctl.o select.o
+ open.o proc.o close.o write.o read.o ioctl.o select.o
# Objects with exported symbols (-DEXPORT_SYMTAB)
OX_OBJS =
# Module objects
# Objects with exported symbols (-DEXPORT_SYMTAB)
OX_OBJS =
# Module objects
EXTRA_CFLAGS +=
# Linux 2.4.2 build system needs next
EXTRA_CFLAGS +=
# Linux 2.4.2 build system needs next
-can-objs := $(O_OBJS)
-obj-y := $(O_OBJS)
-obj-m := can.o
+can-objs = $(O_OBJS)
+obj-y = $(O_OBJS)
+obj-m = can.o
ifndef KERNEL_MODULE_V26
FINAL_MODULE_OBJS=$(obj-m)
ifndef KERNEL_MODULE_V26
FINAL_MODULE_OBJS=$(obj-m)
########## Source/target independent buil of module #############
########## Source/target independent buil of module #############
default : make_this_module
cp $(FINAL_MODULE_OBJS) ../$(FINAL_MODULE_OBJS)
default : make_this_module
cp $(FINAL_MODULE_OBJS) ../$(FINAL_MODULE_OBJS)
install_this_module: make_this_module
su -c "mkdir -v -p $(MODULE_CHAR_LOC) && cp -v $(FINAL_MODULE_OBJS) $(MODULE_CHAR_LOC)"
install_this_module: make_this_module
su -c "mkdir -v -p $(MODULE_CHAR_LOC) && cp -v $(FINAL_MODULE_OBJS) $(MODULE_CHAR_LOC)"
-clean:
- rm -f $(M_OBJS) $(MX_OBJS) $(O_OBJS) $(OX_OBJS) $(obj-m) $(obj-m:%.o=%.ko) \
- $(obj-m:%.o=%.mod.o) .*.o.flags .*.o.cmd .*.ko.cmd .depend .supported_cards.h *~
-
ifndef KERNEL_MODULE_V26
include $(KERNEL_LOCATION)/Rules.make
ifndef KERNEL_MODULE_V26
include $(KERNEL_LOCATION)/Rules.make
+clean:
+ rm -f $(M_OBJS) $(MX_OBJS) $(O_OBJS) $(OX_OBJS) $(obj-m) \
+ .*.o.flags .*.o.cmd .*.ko.cmd .depend .supported_cards.h *~ \
+ ../$(FINAL_MODULE_OBJS)
+
+distclean: clean
+else
+clean:
+ rm -f $(M_OBJS) $(MX_OBJS) $(O_OBJS) $(OX_OBJS) $(obj-m:%.o=%.ko) \
+ $(obj-m:%.o=%.mod.o) .*.o.flags .*.o.cmd .*.ko.cmd .depend .supported_cards.h *~ \
+ ../$(FINAL_MODULE_OBJS)
+
+distclean: clean
########## The following options can be changed ##########
# Compiler
########## The following options can be changed ##########
# Compiler
CFLAGS = -I../include -O2
CFLAGS = -I../include -O2
clean :
rm -f rxtx sendburst readburst send can-proxy *.o .depend
clean :
rm -f rxtx sendburst readburst send can-proxy *.o .depend